I need to find a regex that tests that an input string contains exactly 10 numeric characters, while still allowing other characters in the string.
I'll be stripping all of the non-numeric characters in post processing, but I need the regex for client-side validation.
For example, these should all match:
- 1234567890
- 12-456879x54
- 321225 -1234AAAA
- xx1234567890
But these should not:
- 123456789 (not enough digits)
- 12345678901 (too many digits)
This seems like it should be very simple, but I just can't figure it out.