You want to look at the /s switch on the s/// operator.
$str =~ s/"[^"]+"//gs;
The /s option has no effect in the expression /"[^"]+"/, it is superfluous.
In reply to Re^2: regex for removing quoted text
by jwkrahn
in thread regex for removing quoted text
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |