Example usage for java.lang String replaceAll

List of usage examples for java.lang String replaceAll

Introduction

In this page you can find the example usage for java.lang String replaceAll.

Prototype

public String replaceAll(String regex, String replacement) 

Source Link

Document

Replaces each substring of this string that matches the given regular expression with the given replacement.

Usage

From source file:Main.java

public static String urlToName(String url) {
    return url.replaceAll("[^\\w]", "");
}

From source file:Main.java

public static String removeXMLTags(String in) {
    return in.replaceAll("<[^<>]+>", "");
}

From source file:Main.java

public static String clearXmlHeader(String xml) {
    return xml.replaceAll("[<][\u003F].*[\u003F][>]", "");
}

From source file:Main.java

public static String xmlEscapeText(String text) {
    return text.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;");
}

From source file:Main.java

private static String ignoreBassNote(String name) {
    return name.replaceAll("\\/.*$", "");
}

From source file:Main.java

public static String titlefy(String str) {
    return str.replaceAll("(\\p{Ll})(\\p{Lu})", "$1 $2");
}

From source file:Main.java

public static String deStringify(String in) {
    return in.replaceAll(STRING_ANNOTATION, "");
}

From source file:Main.java

public static String cleanXml(String xml) {
    return xml.replaceAll("\n|\r|\t", "").replaceAll(">\\s*<", "><");
}

From source file:Main.java

public static String cleanupSlashes(String link) {
    return link.replaceAll("/+", "/");
}

From source file:Main.java

public static String formatNR(String text) {
    return text.replaceAll("\r\n", "<br />");
}