sContent.replaceAll("=[^'|\"](.*?)(\\s|>)", "='$1'$2"))<P align='enter'><FONT face='体'><IMG height='0' src="/webinfo/UploadFile/2009/4/13/2009041303321715.jpg" width='0'>sdsdsd</FONT>怎么都把第一个字符给去了
原":<P align=center><FONT face=宋体><IMG height=90 src="/webinfo/UploadFile/2009/4/13/2009041303321715.jpg" width=90>sdsdsd</FONT>
请问那里出错
原":<P align=center><FONT face=宋体><IMG height=90 src="/webinfo/UploadFile/2009/4/13/2009041303321715.jpg" width=90>sdsdsd</FONT>
请问那里出错
所以试一下用
sContent.replaceAll(/=[^'|\"](.*?)(\\s|>)/, "='$1'$2"))
sContent.replaceAll("=([^'\"\s>]+)", "='$1'")); 这样就可以吧
sContent.replaceAll("=([^'\"\s>]+)", "='$1'"));