Java Regex Number Validate isNumber(String value)

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

Description

Check if the value is a digit

License

BSD License

Parameter

Parameter Description
value value expected

Return

the test result

Declaration

public static boolean isNumber(String value) 

Method Source Code

//package com.java2s;
//License from project: BSD License 

import java.util.regex.Pattern;

public class Main {
    /**/*from   w  w w  .  ja  va 2 s .c  o m*/
     * Check if the value is a digit
     * @param value value expected
     * @return the test result
     */
    public static boolean isNumber(String value) {
        return Pattern.matches("[0-9].*", value);
    }
}

Related

  1. isNumber(String str)
  2. isNumber(String str)
  3. isNumber(String str)
  4. isNumber(String str)
  5. isNumber(String str, String sign)
  6. isNumber(String value)
  7. isNumber(String value)
  8. isNumber_Lowerletter_Underline(String str)
  9. isNumberForLength(String numStr, int length)