0

I am learning regex. I want to match something like this - 2 letters, 2 numbers, 4 letters, 10 numbers All these need to be there and in above order too. So far come with this regex

[A-Za-z]{2}[0-9]{2}[A-Za-z]{4}[0-9]{10}

But I want to do exact match. 'XS42NLJK1234567890' should match but not this one 'XS42NLJK123456789015' But its matching the 2nd string too.I want exact match. Any help highly appreciated.

Robin
  • 21
  • 4

0 Answers0