Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Answer: How can I find nested delimiters?

by Anonymous Monk
on Jan 27, 2004 at 13:01 UTC ( #324397=categorized answer: print w/replies, xml ) Need Help??

Q&A > regular expressions > How can I find nested delimiters? - Answer contributed by Anonymous Monk

Either of these will match the longest possible quoted string with only an even number of quotes inside. m#"(?:"[^"]*"|[^"]*)"#;
m#"(?:("?)[^"]*\1)+"#;

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2017-04-27 04:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (500 votes). Check out past polls.