in reply to Re: string manipulations with regular expressions
in thread string manipulations with regular expressions
It results in:$values = "'abc', 'dec'f', ''ghc''" ; $values =~ s/ (?<!\A) # no beginning-of-string in front (?<!,\s) # no comma and space in front \' # quote (?!,\s|\z) # no command and space or end-of-string ahead / \\\' # replace with \' /xg;
I don't believe it is possible to remove the commas between words at the same time as quoting the strings.'abc', 'dec\'f', '\'ghc\''
|
|---|