Solved

regex  - check string

Posted on 2013-05-21
3
315 Views
Last Modified: 2013-05-21
I need a regex with this pathern.
The first two character has to be letters, and the rest (next 4) needs to be numberic number. Max len is 6.

sample

AB0001
DE1111
0
Comment
Question by:VBdotnet2005
3 Comments
 
LVL 22

Accepted Solution

by:
Matt V earned 250 total points
ID: 39185627
How about

[a-zA-z]{2}[0-9]{4}
0
 
LVL 4

Assisted Solution

by:bepsoccer1
bepsoccer1 earned 250 total points
ID: 39185640
[A-Z]{2}\d{4} should work for you.
0
 

Author Closing Comment

by:VBdotnet2005
ID: 39185674
thank you
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question