-
Describe the bugI can't seem to match either '{' or '[' using the parser integrated in the pest website. To ReproduceClick here to try it out. Grammar
Text to match
Output
ScreenshotExtraI've also tried with: Expected behaviorClearly, it should be able to match the given string... right? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
PEGs are eager: https://pest.rs/book/grammars/peg.html#eagerness You can try
or you can define your own rule of allowed characters that can be inside brackets |
Beta Was this translation helpful? Give feedback.
PEGs are eager: https://pest.rs/book/grammars/peg.html#eagerness
so
ASCII*
will also match]
, and the whole expression will fail to match.You can try
ASCII_ALPHANUMERIC
(https://pest.rs/book/grammars/built-ins.html#ascii-rules) instead:or you can define your own rule of allowed characters that can be inside brackets