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

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -