sub find_quote { my $str = $_[0]; my $c; $str =~ s/( (?{$c = 1}) ".*?" (?{$c++}) (?(?{$c % 2 == 0})(?!")|^) ) /<$1>/xg; return $str; }