List of usage examples for java.lang String replaceAll
public String replaceAll(String regex, String replacement)
From source file:Main.java
private static String markdown2HtmlLink(String link) { return link.replaceAll("\\[([^\\]]*?)\\]\\((.*?)\\)", "<a href=\"" + "$2" + "\">" + "$1" + "</a>"); }
From source file:Main.java
public static String formatClassStr(String clazz) { return clazz.replaceAll("\\.", "_"); }
From source file:Strings.java
public static String reduceToAlphaNumerics(String value) { return value.replaceAll("[^0-9a-zA-Z]+", " "); }
From source file:Main.java
public static String cleanPhoneNumber(String phone) { return phone.replaceAll("[ ()-]", ""); }
From source file:Main.java
static public String escapeXML(String str) { return str.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">") .replaceAll("\"", """).replaceAll("'", "'").replaceAll("\n", ""); }
From source file:Main.java
public static String cleanName(String name) { return name.replaceAll("\\[([^\\]]*)\\]", "").replaceAll(" {2,}", " ").trim(); }
From source file:Main.java
public static String decolorize(String string) { return string.replaceAll("\\u00A7(?=[0-9a-fk-or])", "&"); }
From source file:Main.java
public static String extractDigits(String input) { return input.replaceAll("\\D+", ""); }
From source file:Main.java
public static int getWordCount(String s) { s = s.replaceAll("[^\\x00-\\xff]", "**"); int length = s.length(); return length; }
From source file:Main.java
public static String eatBracket(String szText) { return szText.replaceAll("\"", ""); }