-1

I need some help with regular expression as I'm learning it more. Basically I want to be able to find cases where there is a max of 3 letters (both cases) followed by any # of digits.

Here are some scenarios:

AB1234 (OK)
ABC123 (OK)
AB12D3 (Error)
123AB (Error)

Thank you!

1 Answers1

0

This should work:

[A-Za-z]{1,3}[0-9]+

JohnFx
  • 33,720
  • 18
  • 99
  • 158