Javascript正则表达式 [英] Javascript regular expression
本文介绍了Javascript正则表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望匹配以下模式,
2014%
%2014%
2014%
%2014%;%2014%
我尝试了什么:
(^%[0-9] { 4 };?$)+ |(^ [0-9] { 4 }%;?$)+ |( ^%[0-9] { 4 }%;?$)+
i尝试上面的代码。
它的前三个工作但不重复模式(%2014%;%2014%)
可以任何人请帮助..
解决方案
)+ |(^ [0-9] { 4 }%;?
)+ |(^%[0-9] { 4 }%;?
)+
i尝试上面的代码。
它的前3名工作但没有重复模式(%2014%;%2014%)
任何人都可以帮忙...
Hi,
I want to match below pattern,
2014%
%2014%
2014%
%2014%;%2014%
What I have tried:
(^%[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..
解决方案
)+|(^[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..
这篇关于Javascript正则表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文