Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

RE: RegExp Help Needed

by dchetlin (Friar)
on Oct 25, 2000 at 15:49 UTC ( [id://38334]=note: print w/replies, xml ) Need Help??


in reply to RegExp Help Needed

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://38334]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-20 02:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found