Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: This regex seems to have splattered non-greedy everywhere

by pbeckingham (Parson)
on Aug 10, 2005 at 17:45 UTC ( #482674=note: print w/ replies, xml ) Need Help??


in reply to This regex seems to have splattered non-greedy everywhere

It can be easily made to work if you first take out the quoted stuff. Bear in mind that this (and your) code does not handle quoted text that spans lines.

#! /usr/bin/perl use strict; use warnings; while (<DATA>) { chomp; s/'[^']+'//g; print $_, "\n" for split /XX/; } __END__ aXXbXXc abcd a little 'quote XX' quote stuff XX other



pbeckingham - typist, perishable vertebrate.


Comment on Re: This regex seems to have splattered non-greedy everywhere
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://482674]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (12)
As of 2014-09-30 21:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (384 votes), past polls