如何编写至少有3/ 4的正则表达式?
示例:
28 ->假
5555 ->真
6498 ->真
332 ->假
234789 ->真
谢谢!
发布于 2015-10-19 15:45:05
^(?=(?:\d*[5-9]){3,})\d+$
您可以使用lookahead进行this.See演示。
lookahead
https://regex101.com/r/tD0dU9/5
https://stackoverflow.com/questions/33218630
相似问题