Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
长度为三的倍数的字符串的正则表达式是什么?{} 对我不起作用,因为它只允许 min/min-max 的确定值。
这应该适合您的需求:
(?:\w{3})*
\w
[a-zA-Z0-9_]
(?:X)
(?:X{3})