Java String Sanitize sanitizeName(String input)

Here you can find the source of sanitizeName(String input)

Description

sanitize Name

License

Open Source License

Declaration

public static String sanitizeName(String input) throws Exception 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String sanitizeName(String input) throws Exception {
        return blankIfNull(input).replaceAll("[^A-Za-z0-9]", "");
    }/*from w  w w  .j a va 2s . co m*/

    public static String blankIfNull(String input) throws Exception {
        if (input == null) {
            return "";
        }
        return input;
    }
}

Related

  1. sanitizeLine(String line)
  2. sanitizeLineSpaces(String line)
  3. sanitizeLoggerNamePart(String name)
  4. sanitizeMethodName(String methodName)
  5. sanitizeMimeType(final String mimeType)
  6. SanitizeName(String Name)
  7. sanitizeName(String name)
  8. sanitizeName(String name)
  9. sanitizeName(String name)