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

Similar Threads

Help with Regex 1
regex validate rangename 8
RegEx Help - particular anchors 2
Regex wiseguy or girl 2
vb.net regex question 4
Regex Error - unrecognized escape sequence 1
Regex Help 2
RegEx Help 2

Top