Answers for "how to check is a string has numbers"

5

check if string contains numbers

str.matches(".*\\d.*");
Posted by: Guest on November-01-2020
0

check if string can be a number and then make a number

if(Number(myNumber) != NaN){
	myNumber = Number(myNumber);
}
Posted by: Guest on January-22-2021

Code answers related to "how to check is a string has numbers"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language