Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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?
[choroba]: I configured signature font to 2pt size, so I don't care
[choroba]: Moreover, I don't find the Big Lebowski quote offensive
Lady_Aleena wishes she could format her signature a bit without getting metaphorical hives.

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2017-06-23 09:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (539 votes). Check out past polls.