in reply to Re: regex for strings with escaped quotes
in thread regex for strings with escaped quotes
It somehow stops working when I use the regex directly and I cannot see why:
my $str = q{ x "foo \"bar\"" y }; $str =~ /(?:(?|(?:\")(?:[^\\\"]*(?:\\.[^\\\"]*)*)(?:\")))/; print $1, "\n"; # prints nothing
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: regex for strings with escaped quotes
by haukex (Archbishop) on Feb 12, 2019 at 15:55 UTC | |
by morgon (Priest) on Feb 12, 2019 at 16:35 UTC | |
by haukex (Archbishop) on Feb 12, 2019 at 16:47 UTC | |
by morgon (Priest) on Feb 12, 2019 at 17:11 UTC |
In Section
Seekers of Perl Wisdom