Regular matching tags, spaces, newlines, special symbols

if(content){     //Regular matching tags, spaces, newlines, special symbols, etc. ps: If it is a pure picture matching value is empty, the content displays "View Details"      content = content.replace(/<(style|script|iframe)[^>]*?>[\s\S]+?<\/ \1\s*>/gi,'').replace(/<[^>]+?>/g,'').replace(/\s+/g,'').replace(/&[^; ]+;/g,'');     content = content? content: "View Details";  }



Guess you like

Origin blog.csdn.net/qq_42269433/article/details/90176776