Click here to Skip to main content
15,888,113 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
whats wrong with this regular expression:
ValidationExpression=" 2[0-9]{3}[A-H]{2} | 2[0-9]{3}[A-H]{1} | 2[0-9]{3}"
Posted
Comments
[no name] 15-May-13 0:52am    
What you r trying to validate and what is the problem u r facing...
[no name] 15-May-13 1:19am    
why using this validation

Hello,

This seems to be related to your earlier question [^]. Remove the white spaces between the OR. Your expression should read as
2[0-9]{3}[A-H]{2}|2[0-9]{3}[A-H]{1}|2[0-9]{3}

Regards,
 
Share this answer
 
thanx Prasad Khandekar, Rashmikants Monpara and Code-Hun for replying to my problem
i changed the expression to this: ^(2[0-9]{3}[A-H]{0,2})$ now it is working perfectly fine
 
Share this answer
 
Comments
Mas11 15-May-13 6:04am    
then plz accept that solution as ur 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