OT: RegEx Help

B

Bob Johnson

I need a RegEx expresson that validates a string containing 6 characters
according to this criterion:
First character must be alpha (A-Z) upper case only.
Next 5 characters must each be an integer from 0 to 9.

These would pass: G43879, A00009, K98765
These would fail: g43879, 89873E, ABCDEF

I'd sure appreciate some help on this.

Thanks!
 
J

Jon Shemitz

Bob said:
I need a RegEx expresson that validates a string containing 6 characters
according to this criterion:
First character must be alpha (A-Z) upper case only.
Next 5 characters must each be an integer from 0 to 9.

These would pass: G43879, A00009, K98765
These would fail: g43879, 89873E, ABCDEF

[A-Z]\d{5}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,585
Members
45,081
Latest member
AnyaMerry

Latest Threads

Top