-1

Hi Guys I need a regex that checks if the string starts with two upper-case followed by numbers:

Example: DE123456789

Thanx a lot of.

ndnenkov
  • 35,425
  • 9
  • 72
  • 104
Marcus
  • 65
  • 10

1 Answers1

4

Literally:

^[A-Z]{2}\d+
  1. ^ - start of the string
  2. [A-Z] - an upper case letter
  3. {2} - two of those
  4. \d - a digit
  5. + - one or more of those
ndnenkov
  • 35,425
  • 9
  • 72
  • 104