Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
RE: RegExp Help Neededby dchetlin (Friar) |
on Oct 25, 2000 at 15:49 UTC ( [id://38334]=note: print w/replies, xml ) | Need Help?? |
It depends on how robust you need to be. If you don't care about things like `(that "smarts (especially like this)!")', you could do:
s/"(?![^(]*\))/"/g If you really need to have it balance correctly with escaped or quoted parens, you'll probably want to look at a module (I've heard good things about Text::Balanced and I suspect it could help here, but having never worked with it I'll defer to others). -dlc
In Section
Seekers of Perl Wisdom
|
|