List of usage examples for java.lang String replaceAll
public String replaceAll(String regex, String replacement)
From source file:Main.java
public static String getIconAdd(String iconName) { return iconName.replaceAll("(?:.jpg|.JPG|.png|.PNG)", "s80x80.png"); }
From source file:Main.java
/** * Sanitise string for use as C identifier * // www. j av a 2 s .com * @param s String * * @return Sanitised string */ static String sanitise(String s) { return s.replaceAll("/", "_"); }
From source file:Main.java
public static String removeCRLF(String parameter) { return parameter.replaceAll("\r", "").replaceAll("\n", ""); }
From source file:Main.java
public static String htmlEscape(String html) { return html.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">") .replaceAll(" ", " ").replaceAll("'", "'").replaceAll("\"", """) .replaceAll("\n", "<br/>"); }
From source file:Main.java
static public String delTwoLevelBoard(String content) { return content.replaceAll(TWO_LEVEL_BOARD_REGEX_STRING, "$1"); }
From source file:Main.java
private static String prepare(String unprepared) { return unprepared.replaceAll("\\s{2,}", "").replaceAll("\\n", ""); }
From source file:Main.java
/** * Replace the characters not allowed in file names with underscore * @param name/*from ww w . j av a2 s . c o m*/ * @return */ public static String escapeForFileSystem(String name) { return name.replaceAll("[\\\\/:*?\"<>|]+", "_"); }
From source file:Main.java
private static String deleteExcess(String xmlString) { return xmlString.replaceAll("(<region>).*(</region>)", ""); }
From source file:Main.java
/** Perform entity-quoting of quotes within attribute values. */ public static String quoteAttrValue(String s) { return "\"" + s.replaceAll("&", "&").replaceAll("\"", """).replaceAll("\'", "'") + "\""; }
From source file:Main.java
public static String removeQuote(String content) { return content.replaceAll(quoteRegex, ""); }