How to get any text inside parentheses?
kassadin opened this issue · comments
It depends on exactly what your language needs to support, but does including end
in your lookahead help?
E.g.:
Text = "get" "(" parenthesized ")"
parenthesized = (~(")" end) any)*
Great!
I didn't realize that ~
could act on Sequence, I tried many times before in ~(a|b)
, now I can continue
Thank you.
Note that
parenthesized = (~(")" end) any)*
can be simplified to
parenthesized = (~")" any)*
(The end
is not necessary b/c any
does not succeed at the end of the file.)