1 while $str =~ s/PAT/REPL/;
Is the idiom supposed to contain the /g modifier? You didn't include it and I can't say I've ever seen 1 while s/foo/bar/, only 1 while s/foo/bar/g;. So tell me, should there be a /g there or am I in for a new lesson in the regex classroom?
In reply to Re^8: Global regex giving up too soon
by Coruscate
in thread Global regex giving up too soon
by Wassercrats
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |