|
|
|
Clear questions and runnable code get the best and fastest answer |
|
| PerlMonks |
Answer: How can I find nested delimiters? |
| ( #324397=categorized answer: print w/ replies, xml ) | Need Help?? |
|
Q&A > regular expressions > How can I find nested delimiters? 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)+"#;
|
|
||||||||||||||||||