I am trying to create a regex that will match any of the following values:
The rule is: Any string where the first two characters are either "ME", "TR" or 2 numbers, and the last 7 characters are numbers.
(\bME\b|\bTR\b|[0-9]{2})[0-9]{7}
I can't get my regex to match on all the options. Any regex gurus out there who can help me out?
The regex would be: (ME|TR|[0-9]{2})[0-9]{7}
This is my example: /^(ME|TR|\d{2})\d{7}$/
, and here you can try it.
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