regex - Regular Expression user input Java -
this question has answer here:
i new regular expressions , clueless @ moment.
i trying create regular expression in java allow alphabetical characters. integers , special characters not allowed. minimum length possible 2 , maximum length 10.
(^[a-za-z]{2,10}$)
or (\a[a-za-z]{2,10}\z)
you downcase first , make smaller regex if doesn't matter these should work.
Comments
Post a Comment