Java Regex Number Validate isNumeric(String str)

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

Description

is Numeric

License

Apache License

Parameter

Parameter Description

Return

boolean

Declaration

public static boolean isNumeric(String str) 

Method Source Code

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

import java.util.regex.Pattern;

public class Main {

    public static boolean isNumeric(String str) {
        Pattern pattern = Pattern.compile("[0-9]*");
        return pattern.matcher(str).matches();
    }//  w w w. j a v  a  2s  .  c o m
}

Related

  1. isNumeric(String input)
  2. isNumeric(String number)
  3. isNumeric(String s)
  4. isNumeric(String str)
  5. isNumeric(String str)
  6. isNumeric(String str)
  7. isNumeric(String str)
  8. isNumeric(String text)
  9. isNumeric(String value)