Java Regex Number Validate isNumber(String str)

Here you can find the source of isNumber(String str)

Description

is Number

License

Open Source License

Declaration

public static boolean isNumber(String str) 

Method Source Code

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

public class Main {

    public static boolean isNumber(String str) {
        java.util.regex.Pattern pattern = java.util.regex.Pattern.compile("[0-9]*");
        java.util.regex.Matcher match = pattern.matcher(str);
        return match.matches();
        //      if (match.matches() == false) {
        //         return false;
        //      }
        ////ww w.java2  s .c  om
        //      return true;
    }
}

Related

  1. isNumber(String s, boolean[] realnum)
  2. isNumber(String str)
  3. isNumber(String str)
  4. isNumber(String str)
  5. isNumber(String str)
  6. isNumber(String str)
  7. isNumber(String str)
  8. isNumber(String str, String sign)
  9. isNumber(String value)