Click here to Skip to main content
15,903,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I need a regular expression in C#, for string which starts with W then "00" then 5 numbers, after that it can be letters or numbers but something will be there. This W00 and 5 numbers is every important.

Just like all the strings which match, either this: W00235678MCHWIL or this: W002356782158

Its little bit urgent.

Thanks in advance please

What I have tried:

Searching online asking friends etc
Posted
Updated 7-Nov-16 5:37am
v2

Try something like:
^W00\d{5}.

Regexper[^]
Regular Expression Language - Quick Reference[^]
 
Share this answer
 
Try this article;

The 30 Minute Regex Tutorial[^]
 
Share this answer
 
Here is a link to RegEx documentation:
perlre - perldoc.perl.org[^]
Here is links to tools to help build RegEx and debug them:
.NET Regex Tester - Regex Storm[^]
Expresso Regular Expression Tool[^]
This one show you the RegEx as a nice graph which is really helpful to understand what is doing a RegEx:
Debuggex: Online visual regex tester. JavaScript, Python, and PCRE.[^]
 
Share this answer
 
Thanks all, I combined all your suggestions got my problem resolved thank you very much friends.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900