- or download this
my( $quote, $quoted, $end )= $string =~
/(['"])((?:\\.|[^'"\\]+|(?!\1)['"])*)(\1?)/;
die "Unclosed quote: $quote$quoted\n"
if $quote && ! $end;
- or download this
/(['"])((?:\\.|[^\1\\]+)*)(\1?)/
- or download this
/(['"])((?:(?:\\.)+|[^\1\\]+)*)(\1?)/
- or download this
/(['"])((?:(?:\\.)+|[^'"\\]+|(?!\1)['"])*)(\1?)/
- or download this
"'" . '\vv'x35_000 . "z'"
- or download this
my( $quote, $quoted );
if( $str =~ /(['"])/g ) {
...
my $end= pos($str);
$quoted= substr( $str, $beg, $end-$beg-1 );
}