gpt4 book ai didi

c++ - 如何将有界重复匹配为仅 n 和 m 次

转载 作者:太空狗 更新时间:2023-10-29 21:05:55 25 4
gpt4 key购买 nike

基于 this

a{n}  Matches 'a' repeated exactly n times.

a{n,} Matches 'a' repeated n or more times.

a{n, m} Matches 'a' repeated between n and m times inclusive.

问题> 如何匹配 'a' 恰好重复了 n 次或 m 次?谢谢

最佳答案

非常简单:a{n}|a{m} :)

好吗?

关于c++ - 如何将有界重复匹配为仅 n 和 m 次,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8651966/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com