΢ Ͷ ^ ھ

新疆cba新赛季2 :jsͨ^tƥ]ЃݵĿ՘˺

cba㶫 www.axwwg.com  •rg2020-02-26 19:43:03   ߣ   ҪuՓ(0)

js tƥ]ЃݵĿ՘˺Ƴ?

<span></span>
<p></p>
ȵ
t

/<([a-z]+&#63;)(&#63;:\s+&#63;[^>]*&#63;)&#63;>\s*&#63;<\/\1>/ig



ht

js tƥ]ЃݵĿ՘˺Ƴ?

<span></span>

<p></p>

ȵ

t

/<([a-z]+?)(?:\s+?[^>]*?)?>\s*?<\/\1>/ig

html='<div id="fixedTools" class="hidden-xs hidden-sm">'+
'\n  <a id="backtop" class="hidden border-bottom" href="#" rel="external nofollow" ></a>'+
'\n'+
'\n  <div class="qrcodeWraper">'+
'\n    <a href="/app#qrcode" rel="external nofollow" ><span class="glyphicon glyphicon-qrcode"></span></a>'+
'\n    <img id="qrcode" class="border" alt="sf-wechat" src="//files.jb51.net/file_images/article/202002/20200221234913.png" />

]]stylespanȥ

spanľ

ĬJ݋span]Иʽě]бҪ

str=str.replace(/<span\s*?(?!:style)>(.[^<>]*)<\/span>/ig,"$1");

ȿλ


ĂڲijЩ(@Щ)֮ǰ֮Ė|Ҳf\b,^,$ǘָһλ@λÑԓMһėl()ҲQ㌒߀Ӂfɣ

Á•һԓŒt_ʽֻЮԞrŕ^mMƥ

(?=exp)Ҳ㌒AyДFλõĺƥ_ʽexp\b\w+(?=ing\b)ƥingYβĆ~ǰ沿(ingIJ)I'm singing while you're dancing.rƥsingdanc

(?<=exp)Ҳ㌒lFλõǰƥ_ʽexp(?<=\bre)\w+\bƥre_^Ć~ĺ벿(reIJ)ڲreading a bookrƥading

ҪoһLĔÿλgһ̖(ȻǏ߅)@ӲҪǰӶ̖IJ֣((?<=\d)\d{3})+\b1234567890MвҕrY234567890

@ͬrʹ@ɷNԣ(?<=\s)\d+(?=\s)ƥԿհ׷gĔ(ٴΏ{@Щհ׷)

ؓ㌒
ǰ҂ᵽ^ôҲijַijַַķ(x)҂ֻҪ_ijַ]гFȥƥrôk҂@ӵĆ~--Fĸq,qIJĸu,҂ԇLԇ@ӣ

\b\w*q[^u]\w*\bƥ治ĸuĸqĆ~yԇ(˼SJֱӾ^)lFqFچ~ĽYβԒIraq,Benq@_ʽ͕e@[^u]Ҫƥһַqdž~һַԒ[^u]ƥqĆ~ָ(ǿոǾ̖ʲô)\w*\bƥһ~\b\w*q[^u]\w*\bƥIraq fightingؓ㌒ܽQ@ӵĆ}ֻƥһλMκַF҂@ӁQ@}\b\w*q(?!u)\w*\b

㌒ؓAyД(?!exp)Դλõĺ治ƥ_ʽexp磺\d{3}(?!\d)ƥλ@λֵĺ治ǔ\b((?!abc)\w)+\bƥ䲻BmַabcĆ~

ͬ҂(?<!exp),㌒ؓlԁԴλõǰ治ƥ_ʽexp(?<![a-z])\d{7}ƥǰ治Сĸλ

һsӣ(?<=<(\w+)>).*(?=<\/\1>)ƥ䲻ԵĺHTML˺ă(?<=<(\w+)>)ָ@ӵǰY̖Ć~(<b>)Ȼ.*(ַ),һY(?=<\/\1>)עY\/õǰ^ַDx\1tһõDz@ĵһMǰ(\w+)ƥă@ǰYH<b>ԒY</b>_ʽƥ<b></b>֮gă(ٴǰYͺY)

@x

1<span/s*? Ҫǿ]<span     >c<span>]ڃ

\sƥַ*ʾַ?DZʾǰĿпɟo

2(?!:style) ʾ҂ȲstyleIJſƥеĿ϶Ҳ@ȡ@̖$1

3(.[^<>]*) ƥ<span></span>gĔ

@섂_ʼо@˺Îׂtȷܿ

//ӏQҪǿ]brĆ}
function doRepAdvance(s){
var str=s.replace(/<p><br type="_moz">\s*?<\/p>/ig,"");
str=str.replace(/<p>\s*<br type="_moz">\s*<\/p>/ig, "");
str=str.replace(/<p>\s*?<br\s?\/?>\s*?<\/p>/ig, "");
str=str.replace(/<p>(\s|\ \;| ||\xc2\xa0)*<\/p>/ig, "");
str=str.replace(/<p>\s*?<\/p>/ig,"");
str=str.replace(/<p> <\/p>/ig,"");
str=str.replace(/<br type="_moz">\n <\/p>/ig, "</p>");
str=str.replace(/<br type="_moz">\s*?<\/p>/ig, "</p>");
str=str.replace(/<br\s?\/?>\s*?<\/p>/ig, "</p>");
str=str.replace(/<br \/>\n <\/p>/ig, "</p>");
str=str.replace(/<br>\n <\/p>/ig, "</p>");
//br
str=str.replace(/(<br type="_moz">\s*)+<\/p>/ig, "</p>");
str=str.replace(/(<br\s?\/?>\s*)+<\/p>/ig, "</p>");
//՘˺
str=str.replace(/<p style=["'].[^<>]*["']>/ig, "<p>");
str=str.replace(/<span style="background-color: initial;">/ig, "<span>");
//]stylespanȥ
str=str.replace(/<span\s*?(?!:style)>(.[^<>]*)<\/span>/ig,"$1");
str=str.replace(/<([a-z]+?)(?:\s+?[^>]*)?>(\s| )*?<\/\1>/ig, "");
//str=str.replace(/<([a-z]+?)(?:\s+?[^>]*)?>\s*?<\/\1>/ig, "");

return str;
}

涼һЩÖ|wԼо

P