TASdvlper has asked for the wisdom of the Perl Monks concerning the following question:
Is there some way to combine the following 2 regex into one ?
actually, this particular example does 2 unique substitutions, how would you handle multiple substitutions (in conjnction with the above regex) ? e.g.$wrapper =~ s/\</</g; $wrapper =~ s/\>/>/g;
Thanks all.$wrapper =~ s/foo/bar/g; $wrapper =~ s/bar/foo/g; ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regular expression question
by Abigail-II (Bishop) on Jan 15, 2004 at 21:32 UTC | |
by TASdvlper (Monk) on Jan 16, 2004 at 16:53 UTC | |
by Abigail-II (Bishop) on Jan 16, 2004 at 17:00 UTC | |
by TASdvlper (Monk) on Jan 16, 2004 at 19:16 UTC | |
by Abigail-II (Bishop) on Jan 16, 2004 at 20:17 UTC | |
| |
|
Re: Regular expression question
by Roy Johnson (Monsignor) on Jan 15, 2004 at 21:48 UTC | |
|
Re: Regular expression question
by BrowserUk (Patriarch) on Jan 15, 2004 at 21:54 UTC | |
by demerphq (Chancellor) on Jan 15, 2004 at 23:27 UTC | |
by BrowserUk (Patriarch) on Jan 15, 2004 at 23:45 UTC |