I want to use regex pattern for validation,
-
regex for allowing
only alphabets and space onlyfor this am using
^[a-zA-Z][a-zA-Z\\s]+$but its not validating correctly. -
regex for allowing
all aplhabets,numbers except special characters.
Anyone can help me, with this two regex patterns ?
Thanks
^[a-zA-Z\s]+$(if you want all white spaces, like tabs, etc.)or
^[a-zA-Z ]+$(if you want only "normal" spaces)^[a-zA-Z0-9]+$http://download.oracle.com/javase/1.4.2/docs/api/java/util/regex/Pattern.html