Reputation: 6512
I need a regex to disallow:
0 0123 abcd-)(^&%$!"!"£ etc`
to allow:
1234567890
I have the following so far but it fails
/^[1-9]|[1-9]\d+$/
Upvotes: 1
Views: 80
Reputation: 66498
Try this regular expression
/^[1-9][0-9]*$/
Upvotes: 4