I'm trying to match a string using regex (of which I am new to) but I can't get it to match.
These should be accepted:
- GT-00-TRE
- KK-10-HUH
- JU-05-OPR
These should not:
- HTH-00-AS
- HM-99-ASD
- NM-05-AK
So the pattern goes 2 letters, hyphen, 2 digits (between 00 and 11 inclusive), hyphen, 3 letters.
So far the best I can come up with is:
var thePattern = /^[a-z]{2}[-][00-11][-][a-z]{3}$/gi;
I can't help but feel that I'm pretty close.
Can anyone give me any pointers?
Thanks.