-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
  • 34,386
  • 9
  • 72
  • 100
Marcus
  • 55
  • 8

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
  • 34,386
  • 9
  • 72
  • 100