Solved

regex  - check string

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

743 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

13 Experts available now in Live!

Get 1:1 Help Now