正则表达式去除所有标签html标签

tempStr = tempStr.replace(/(<([^>]+)>)/ig,"").replace(/[
]/g,""); //去除所有html标签<></>.去除所有换行符。
tempStr = tempStr.replace(/s+/g,'#'); //所有的空格替换成 #
原文地址:https://www.cnblogs.com/geekswg/p/13420349.html