正则

var reg = new RegExp(text + "[\s\S]*?", "g");

var t=text.replace(///g, '') /// 匹配 /
原文地址:https://www.cnblogs.com/xsSystem/p/10740024.html