Think about Loose Coupling | |
PerlMonks |
Re^2: regex issueby ExReg (Priest) |
on Aug 03, 2016 at 18:20 UTC ( [id://1169094]=note: print w/replies, xml ) | Need Help?? |
A slightly different approach can give you what you are looking for. By using a lookahead, you can do what you want.
The \b are word boudaries (change from letter/number/underscore) to non-letter/number/underscore or vice-versa. The (?= looks forward for what comes after it, but remembers where it starts. The \1 is the same as your \g1 (I unfortunately have an older perl.) The g at the end means capture them all het appears twice since it is there three times
In Section
Seekers of Perl Wisdom
|
|