In a similar vein, you could match the characters before and after using a character class that says "anything but quote", then put those into the replacement string like this:
$x =~ s/([^"])"([^"])/$1""$2/g;
In reply to Re: Regex matching on anywhere but the beginning or end of a line
by steves
in thread Regex matching on anywhere but the beginning or end of a line
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |