Don't ask to ask, just ask | |
PerlMonks |
Re: specific /\G/g troublesby chipmunk (Parson) |
on Dec 13, 2001 at 09:38 UTC ( [id://131550]=note: print w/replies, xml ) | Need Help?? |
\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.
In Section
Seekers of Perl Wisdom
|
|