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.
如果我有如下子规则:
.. (~']' ~']')* ...
它只会匹配偶数个字符吗?
(假设点不是元字符)
不完全是,它将匹配零个或偶数个字符。
编辑
要匹配引用块,请执行以下操作:
QUOTE : '[[' (options {greedy=false;} : . )* ']]' ;
假设[[ some text here ]]是一个报价块。
[[ some text here ]]