Consider this perl script. It will put a "\" before any quote character, but only if it's not already preceded by a "\" character.
$txt = "fu\"bar askldj askld\\\"asd lakj sdkljasd\""; print "before: ", $txt, "\n"; if($txt =~ s/([^\\])"/$1\\"/g) { print "result: ", $txt,"\n"; }
# ./test.pl before: fu"bar askldj askld\"asd lakj sdkljasd" result: fu\"bar askldj askld\"asd lakj sdkljasd\"
In transcript I thought it should be :
replaceText(pStr, "([^\\])""e, "$1\""e)
Which works *except* for the $1 is used literally instead of as a backreference.
Alex Rice <[EMAIL PROTECTED]> | Mindlube Software | <http://mindlube.com>
what a waste of thumbs that are opposable to make machines that are disposable -Ani DiFranco
_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution