var html = "Ruby Louvreby 司徒正美
";
var text = html.replace(/<(?:.|\s)*?>/g, "");
console.log(text);//VM247:3 Ruby Louvreby 司徒正美
求大神给我讲解下这个正则表达式,实在看不明白π-π。。。
谢谢啦
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
你这儿是替换功能, 就是把 <xxxx> 这种替换成空