use strict; use warnings; my ($quote_on,$output); $_ = q/this is a "test of some regexp" blah blah this is another "test of some regexp" foo bar/; for (split //) { $quote_on = ($quote_on ? 0 : 1) if (/\"/); s/\s/_/g if $quote_on; $output .= $_; } print "output: $output\n";
In reply to Re: regexp - replace spaces in quoted string
by Anonymous Monk
in thread regexp - replace spaces in quoted string
by /dev/luser
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |