正则表达式去除所有标签html标签
tempStr = tempStr.replace(/(<([^>]+)>)/ig,"").replace(/[\r\n]/g,""); //去除所有html标签<></>.去除所有换行符。 tempStr = tempStr.replace(/\s+/g,'#'); //所有的空格替换成 #
本文来自博客园,作者:独行侠X,转载请注明原文链接:https://www.cnblogs.com/geekswg/p/13420349.html
tempStr = tempStr.replace(/(<([^>]+)>)/ig,"").replace(/[\r\n]/g,""); //去除所有html标签<></>.去除所有换行符。 tempStr = tempStr.replace(/\s+/g,'#'); //所有的空格替换成 #
本文来自博客园,作者:独行侠X,转载请注明原文链接:https://www.cnblogs.com/geekswg/p/13420349.html