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.
是否可以匹配中间项。像这样:
a a ... b ... c c
中间元素得到 b 其余的 a 和 c
这只有在a元素和c元素的数量是恒定的情况下才有效,即。
a
c
a || a |*| b |*| c||c
这代表 2*a, many b, 2*c
也许更好的解决方案是创建小的扩展,您可以在其中使用任何可用的匹配技术?
我没有尝试过,但也许:
a |*| a || b || c |*| c