The regular expression for a TIN is ^\d{3}-\d{2}-\d{4}$, but I need to accept the following (with or without the "*"):
123-45-6789 or 123-45-6789*
Make it match one * (normally a special character, but escaped with the backslash it becomes the literal * character), optionally (with ?, which means 0 or 1 of the previous):
^\d{3}-\d{2}-\d{4}\*?$
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With