I felt that the three captures were not very good, so I studied how to use pre-query to achieve the judgment ..CodeAs follows...
<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312"/>
<Title> A new SRC capture was found, which was completed by a negative pre-query </title>
</Head>
<Body>
<Textarea id = "WC" style = "width: 500px; Height: 100px;">
'" src = 1.px>
</Textarea>
<SCRIPT type = "text/JavaScript">
/*
However, for efficiency, $1 $2 $3 is much better than $2, but it is only about % 14-% 8...
/]) +? Src = (['"]?) ([^ \ S> "'] * (? :(?! \ 1). [^ \ s> "'] *) \ 1 (? : "[^"] * "| '[^'] * '| [^"'>]) *>/Ig; // exact mode: $2
/]) +? Src = (? : "([^"] *) "| '([^'] *) '| ([^"' \ S>] *) (? : "[^"] * "| '[^'] * '| [^"'>]) *>/Ig; // exact mode: $1 $2 $3
/] *? Src = (['"]?) ([^ \ S> "'] * (? :(?! \ 1). [^ \ s> "'] *) \ 1 [^>] *>/ig; // get $2 in simple mode
/] *? Src = (? : "([^"] *) "| '([^'] *) '| ([^"' \ S>] *) [^>] *>/ig; // simple mode: $1 $2 $3
-In simple cases, the contents in SRC cannot be correctly captured. (3 quotation marks)
*/
VaR r =/]) +? Src = (['"]?) ([^ \ S> "'] * (? :(?! \ 1). [^ \ s> "'] *) \ 1 (? : "[^"] * "| '[^'] * '| [^"'>]) *>/Ig; // exact mode: $2
Document. getelementbyid ('wc '). value. Replace (R, function (L, $1, $2 ){
Alert (L + '\ NSRC = |' + $2 + '| ');
});
</SCRIPT>
</Body>
</Html>