Remove the script regular method in html code and the html code script
Removes the script Regular Expression in html code.
/*** Remove the script characters in the html code (<script...>... </script> and <script... /> * @ author ob **/public class Regex {/*** @ param args */public static void main (String [] args) {// note, string s = "<script type = 'text/javascript '> aaaa </SCript> bbbbbbbbb <SCRIPT type = 'text/javascript'/> ccccc <SCRIPT type =' text/javascript '> mm </SCRIPT> "; s = s. replaceAll ("(? I) (<SCRIPT) [\ s \ S] *? (</SCRIPT>) | (/>) "," "); // ignore the case-insensitive regular System. out. println (s );}}
Running result: bbbbbbbbbccccc
The above method to remove the script Regular Expression in the html code is all the content shared by the editor. I hope to give you a reference, and I hope you can provide more support for the help house.