0

I need letters A-F only in capitals which is ^[A-F]. I then need 3 digit numbers only, from 001 to 140.

I have this

(0?[0-9]?[0-9]|1[01][0-9]|12[0-9]|13[0-9]|14[0])$

but that isn't limiting to 3 digits.

anyone able to assist please?

ggorlen
  • 26,337
  • 5
  • 34
  • 50
braddo
  • 27
  • 4

1 Answers1

2

This should work:

/[A-F](00[1-9]|0[1-9][0-9]|1[0-3][0-9]|140)/

If it's first the character and then the number as I seem to understand from your description.

jeprubio
  • 14,400
  • 5
  • 32
  • 47