Not wanting to end up with a chameleon question I have started a new one, I am trying to use php regex to match the following...
- Only allow alphanumeric characters
- Have at least 2 characters
- Does not consist of only numbers
I have this regex so far http://regex101.com/r/lL3uT4....
^(?![0-9]+$)[a-zA-Z0-9 ]{2,}$
This is working but the following data still validates when i want it to fail...
47 (note the space after 47)
(two spaces next to each other)
I understand it is to do with spaces but I still need the following to validate...
47 International
3 apple
I think what I am trying to do is allow spaces but fail them if the string consists entirely of spaces or if there is a space but then no character afterwards