-
-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
I'm trying to make a parser that will parse
[IGNORE]
comment
random stuff
[END]with something like
ignoreHeaderStart = "[IGNORE]"
ignoreHeaderEnd = "[END]"
matchAnyThing = REGEXP(".*")
ignoreSection = Sequence(ignoreHeaderStart, matchAnyThing, ignoreHeaderEnd)but the only way I have been able to do it is by using a complicated regex because matchAnything is too greedy and consumes the last [END]. So the parser is always waiting for an [END] token.
is there a way to parse anything from a starting token to an end token that allows anything in the middle?
i'm not asking for a regex that will do what I want, I've found one but it is not very practical(i'm interested in other ones that would work just out of interest), but I think a built in pyleri function would be more suitable for the job
Metadata
Metadata
Assignees
Labels
No labels