Click here to Skip to main content
15,919,613 members
Please Sign up or sign in to vote.
1.60/5 (2 votes)
See more:
hi,

i don't how to write regular expression.

First 5 digit should be 0
After 5 digits, there should be a slash (/)
After slash the user should be able add text.


can any one tell me how to write this regular expression.

thanks &Regards
sam.198979
Posted
Comments
Maciej Los 3-Jul-13 8:59am    
What have you done so far?
Where are you stuck?
sam.198979 3-Jul-13 9:00am    
^[0]\d{4}\\[A-z]$
Joezer BH 24-Jul-13 0:39am    
Almost :)
add * at the end:
^[0]\d{4}\\[A-z]*$
sam.198979 3-Jul-13 9:00am    
is it correct

The Rex could be:
C++
\b0{5}\\[\w\s]*
 
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