How to check if a string contains only numbers and spaces using RegEx?
i.e.
Pretty loose, but it fits my requirements.
Suggestions?
How about /^[\d ]+$/? If he needs to start and end with a number, he /^\d[\d ]*\d$/must do it.
/^[\d ]+$/
/^\d[\d ]*\d$/
[0-9]
[0-9 ]
[0-9 ]{1,}
[0-9 ]{1,9}
n :
^(\s*\d\s*){11}$
n = 11; :
- :
\d*|\s+^[A-Za-z]