I was definitely overthinking or underthinking the problem. Here is my take for the record.
sub find_quote { my $str = $_[0]; my $c; $str =~ s/( (?{$c = 1}) ".*?" (?{$c++}) (?(?{$c % 2 == 0})(?!")|^) ) /<$1>/xg; return $str; }
--
John.
In reply to Re: Matching escaped quoted strings
by jmcnamara
in thread Matching escaped quoted strings
by jmcnamara
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |