您现在的位置是:网站首页> 编程资料编程资料
js正则匹配table tr_正则表达式_
2023-05-25
289人已围观
简介 js正则匹配table tr_正则表达式_
我觉得比ijao简单,但是脑子就是转不过弯。。。。请正则高手看看阿。
/
]*>[\s\S]*?<\/tr>/gi, 分享一个函数
//普通替换 function doRepNormal(s){ var str=s.replace(/
\s*?<\/p>/ig,""); str=str.replace(/\s*?
\s*?<\/p>/ig, ""); str=str.replace(/(\s|\ \;| | |\xc2\xa0)*?<\/p>/ig, ""); str=str.replace(/
\s*?<\/p>/ig,""); str=str.replace(/
<\/p>/ig,""); str=str.replace(/
"); str=str.replace(/
\n <\/p>/ig, "
\s*?<\/p>/ig, ""); str=str.replace(/
\s*?<\/p>/ig, ""); str=str.replace(/
\n <\/p>/ig, ""); str=str.replace(/
\n <\/p>/ig, ""); //表格替换 str=str.replace(/]*>/ig, "
"); str=str.replace(/]*>/ig, ""); str=str.replace(/]*>/ig, ""); str=str.replace(/]*>/ig, ""); str=str.replace(/
]*>/ig, " "); str=str.replace(/ ]*>/ig, " "); str=str.replace(/ ]*>/ig, " "); str=str.replace(/ \s*? /ig, "
"); str=str.replace(/<\/p>\s*?<\/th>/ig, " "); str=str.replace(/]*>\s*? /ig, "
"); str=str.replace(/ \s*? /ig, "
"); str=str.replace(/<\/p>\s*?<\/td>/ig, " "); return str; }以上就是js正则匹配table tr的详细内容,更多关于js正则table的资料请关注其它相关文章!
相关内容
点击排行
本栏推荐
![]()
