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

I want to match below pattern,

2014%
%2014%
2014%
%2014%;%2014%


What I have tried:

JavaScript
(^%[0-9]{4};?$)+|(^[0-9]{4}%;?$)+|(^%[0-9]{4}%;?$)+


i tried above code.
its working for first 3 but not repeated pattern (%2014%;%2014%)

Can any one please help on that..
Posted
Updated 2-Jan-17 21:38pm
v2

1 solution

Try this:
^%\d{4}%$|^\d{4}%$|^%\d{4}$|^(%\d{4}%);\1$
 
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