in reply to Re: Global regex giving up too soon
in thread Global regex giving up too soon
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Global regex giving up too soon
by Abigail-II (Bishop) on Jan 20, 2004 at 12:48 UTC | |
|
Re: Re^2: Global regex giving up too soon
by Anonymous Monk on Jan 20, 2004 at 13:09 UTC | |
by Coruscate (Sexton) on Jan 20, 2004 at 13:18 UTC | |
by Abigail-II (Bishop) on Jan 20, 2004 at 13:30 UTC | |
by Coruscate (Sexton) on Jan 20, 2004 at 13:43 UTC |