Please assist with the proper RegEx matching. Any 2 letters followed by any combination of 6 whole numbers.
These would be valid: RJ123456 PY654321 DD3212
Everything you need here can be found in this quickstart guide. A straightforward solution would be [A-Za-z][A-Za-z]\d\d\d\d\d\d or [A-Za-z]{2}\d{6}.
[A-Za-z][A-Za-z]\d\d\d\d\d\d
[A-Za-z]{2}\d{6}
If you want to accept only capital letters then replace [A-Za-z] with [A-Z].
[A-Za-z]
[A-Z]