Code:
var myPattern:RegExp = /\"/;
trace(a.replace(myPattern, "\\\""));
<TEXTFORMAT LEADING=\"2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="10" COLOR="#0B333C" LETTERSPACING="0" KERNING="0">sdfdsfdsf</FONT></P></TEXTFORMAT>
above im using that regular expression to escape the " in the string. however it only does it for the first "
What am I doing wrong?