Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java regex 10 digit number

String regex = "^d{10}$";
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher("9876543210");
matcher.matches(); // returns true if pattern matches, else returns false
Source by codingnconcepts.com #
 
PREVIOUS NEXT
Tagged: #java #regex #digit #number
ADD COMMENT
Topic
Name
4+7 =