in reply to Print what regex finds or invert regex for substitution
In the substitution part $2 holds the match-group you do not seem to want.
So take one of the other groups!
Could be that you will need to add new groups with parens: ( regexes ), shouldn't be too complicated cause this regex is really well documented.
see perlretut#Extracting matches for about how grouping and numbered vars work.
Cheers Rolf
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Print what regex finds or invert regex for substitution
by BrianBSL (Initiate) on Mar 17, 2012 at 20:54 UTC |