Skip to content

Pattern for mode in multimode lexer #2000

Answered by msujew
dhowe asked this question in Q&A
Discussion options

You must be logged in to vote

You can probably use something like (?:(?!}@).)*. It uses a negative lookahead group (?!) to prevent matching }@ and then attempts to match any character .. This is repeating until it arrives at the end of the input or the }@ sequence.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by dhowe
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1999 on November 16, 2023 09:46.