in reply to How can I find nested delimiters?

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