Some days, I try to create a specific regex to validate a simple "Name" field. Yet even today, could not the way I wanted ...
I would like to validate a field as follows:
- to write any character A-Z and/or a-z
- to write numbers since she has some character from A-Z and/or a-z.
- do not allow write only numbers
For example, valid:
- Only letters: Microsoft Corporation, Asus Technologies, etc...
- Letters and Numbers: Tom 182, James 007 Bond, etc... (numbers can be any character position: XXXXX 98998 XXXX 87 XXX )
For example, invalid:
- 098230983 (only number is invalid!)
The failure code REGEX: (^[a-zA-Z\ \']+$)|([0-9]*[a-z\ \']+$)
PS: regex online: http://gskinner.com/RegExr/
Thanks to all.