List of usage examples for java.lang String replaceAll
public String replaceAll(String regex, String replacement)
From source file:Main.java
public static String elementContentFilter(String s) { return s.replaceAll("<", "<").replaceAll("&", "&").replaceAll("]]>", "]]&"); }
From source file:Main.java
public static String unmask(String s) { return s.replaceAll("[^0-9]*", ""); }
From source file:Main.java
public final static String toNbsp(String s) { return s.replaceAll(" ", " "); }
From source file:Main.java
public static String commentContentFilter(String s) { return s.replaceAll("--", ""); }
From source file:Main.java
public static String removeSpecialCharacters(String s) { return s.replaceAll("\\W", ""); }
From source file:Main.java
public static String arributeContentFilter(String s) { return s.replaceAll("<", "<").replaceAll("&", "&").replaceAll("\"", """); }
From source file:Main.java
public static String getStringWithoutSurroundingQuotes(String s) { s = s.replaceAll("^\"", ""); // start quotations mark s = s.replaceAll("\"$", ""); // end quotation mark return s;/*w w w. jav a 2s . com*/ }
From source file:Main.java
public static String _escapeXMLChars(String s) { return s.replaceAll("&", "&").replaceAll("'", "'").replaceAll("\"", """) .replaceAll("<", "<").replaceAll(">", ">"); }
From source file:Main.java
public static String encodeURL(String url) { return url.replaceAll(" ", "+").replaceAll("\n", ""); }
From source file:Main.java
static final String escape(String s) { return s.replaceAll("\"", """).replaceAll("'", "&apos").replaceAll("<", "<").replaceAll(">", ">") .replaceAll("&", "&"); }