Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: specific /\G/g troubles

by chipmunk (Parson)
on Dec 13, 2001 at 09:38 UTC ( #131550=note: print w/replies, xml ) Need Help??


in reply to specific /\G/g troubles

\G forces the regular expression to match at the point where the last match left off, or not at all. Looking at your sample data, the regex does not match where the last match left off; it matches later in the string. You could fix it so the end of each match coincides with the beginning of the next match, but it would be simpler to just remove the \G. I don't think it's useful in this case.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2020-01-20 22:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?