CSS font stacks & developer FAQs with Web standards
Site navigation below

One of hundreds of answers available with our premium content service.

Part answer

A: The simplest way to check that a String does not contain any numbers is to use the regular expression class Pattern in the java.util.regex package. The method below uses the regular expression [^0-9]+ to check that none of the characters in the input string is a number. The square brackets define a character class. The negation modifier ^ followed by the number range 0-9 means "not a number". The + quantifier asks the regular expression to match the character class one or more times.

… full answer hidden

Click for full answers

Premium members click below for full answer
How can I check a string has no numbers?

Home · Web fonts · Font stacks · FAQs · Java · CSS · Javascript · HTML · Site manager