RegEx pattern any two letters followed by six numbers

regex

Solution

`[a-zA-Z]{2}\d{6}`

`[a-zA-Z]{2}` means two letters `\d{6}` means 6 digits

If you want only uppercase letters, then:

`[A-Z]{2}\d{6}`

Problem

Please assist with the proper RegEx matching any 2 letters followed by any combination of 6 whole numbers. ``` These would be valid: RJ123456 PY654321 DD321234 These would not DDD12345 12DDD123 ```

Original source