用RegExp注意转义\ return obj.replace(new RegExp(">[\\s]*"+oldStr+"[\\s]*<","gm"),
RegExp可以匹配空格
用RegExp注意转义\
return obj.replace(new RegExp(">[\\s]*"+oldStr+"[\\s]*<","gm"),
\s前要再加个\,就是\\s代表匹配空格...