List of usage examples for java.lang String replaceAll
public String replaceAll(String regex, String replacement)
From source file:Main.java
public static String replaceCode_dqm(String text) { text = null == text ? "" : text; return text.replaceAll("\"", ""); }
From source file:Main.java
public static String getGUID() { String uuid = UUID.randomUUID().toString(); String guid = uuid.replaceAll("-", "").toLowerCase() + System.currentTimeMillis(); return guid;/*from w ww.ja va 2 s . co m*/ }
From source file:Main.java
public static String gainUUID() { String strUUID = UUID.randomUUID().toString(); strUUID = strUUID.replaceAll("-", "").toLowerCase(); return strUUID; }
From source file:Main.java
public static String replaceCode_bracket(String text) { text = null == text ? "" : text; return text.replaceAll("\\[", "").replaceAll("\\]", "").replaceAll("\"", ""); }
From source file:com.jslsolucoes.tagria.lib.tag.x.StringUtil.java
public static String lineBreak(String value) { return value.replaceAll("\n", "<br>"); }
From source file:Main.java
private static String applyRule(String encoded, String toReplace, String replacement) { return encoded.replaceAll(Pattern.quote(toReplace), replacement); }
From source file:Main.java
private static String formatModel(String model) { return model == null ? null : model.replaceAll("-", "").replaceAll("\\s", "").replaceAll("_", "").replaceAll("\\(", "") .replaceAll("\\)", "").trim(); }
From source file:Main.java
/** * decode the string to <, >, </ * @param text//from www.j a va 2s . c o m * @return */ public static String decodeString(String text) { String ret = null; ret = text.replaceAll("<", "<"); ret = ret.replaceAll(">", ">"); ret = ret.replaceAll("'", "'"); ret = ret.replaceAll(""", "\""); ret = ret.replaceAll("&", "&"); return ret; }
From source file:Main.java
public static String encodeXML(final String text) { String outText = text.replaceAll("&", "&"); outText = outText.replaceAll("<", "<"); outText = outText.replaceAll(">", ">"); outText = outText.replaceAll("'", "'"); outText = outText.replaceAll("\"", """); return outText; }
From source file:Main.java
/** * escape characters like <, &, > * @param text//from ww w. j a v a 2s . c o m * @return */ public static String encodeString(String text) { String ret = null; ret = text.replaceAll("&", "&"); ret = ret.replaceAll("<", "<"); ret = ret.replaceAll(">", ">"); ret = ret.replaceAll("'", "'"); ret = ret.replaceAll("\"", """); return ret; }