Solved

regex  - check string

Posted on 2013-05-21
3
312 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

911 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now