reduce To Alpha Numerics with Regex : Digit Number « Regular Expressions « Java






reduce To Alpha Numerics with Regex

       


public class Strings {
    public static String reduceToAlphaNumerics(String value) {
        return value.replaceAll("[^0-9a-zA-Z]+", " ");
    }

}

   
    
    
    
    
    
    
  








Related examples in the same category

1.Check if given string is a number (digits only)
2.Check if given string is numeric (-+0..9(.)0...9)
3.Check if given string is number with dot separator and two decimals
4.Match number
5.Match a single digit
6.Matcher Pattern number