in reply to Regarding Regular Expressions
the g looks for all occurrences.$mystr =~ s/whatever/e.*fg/g;
which produces a new fg. If this is not what you want Id suggest:mystr: abcdwhateverhijklfghijklabcdwhatever
Is there anyone around who can reduce this to only one regexp?$mystr =~ s/whatever/e.*fg/g while ( $mystr =~ /e.*fg/);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regarding Regular Expressions
by pbeckingham (Parson) on Aug 17, 2004 at 13:15 UTC | |
by borisz (Canon) on Aug 17, 2004 at 13:28 UTC |