Do you know where your variables are? | |
PerlMonks |
Re: Regex to strip, keep, or add—dependingby JediWizard (Deacon) |
on Aug 06, 2005 at 15:41 UTC ( [id://481500]=note: print w/replies, xml ) | Need Help?? |
The above matches : An amperstand (at the beging of the string/line) followed by one or more letters or numbers (in group 1) folowed by and number of parenthesis (in group 2).
It appears you are trying to use perl code to modify perl code. This is not usually a safe idea (unless you really really know what you are doing). The Perl parser is very complex, and will account for more things than you are going to want to deal with in a regex. The having been said... the following I believe will do as close as I can get to what you mean
But keep in mind... this will fail in a situation like:
The perl parser will understand that.... but the supplied regex will not. They say that time changes things, but you actually have to change them yourself. Andy Warhol
In Section
Seekers of Perl Wisdom
|
|