Replies: 1 comment 7 replies
-
This suggests a poorly structured parser. You really should be moving forwards if you are able to parse something expected. Usually, you'd only backtrack when there is something unexpected in the stream and you need to try alternatives. Perhaps if you expand your question to some more specifics, I can give you some better advice? But, if you reaally want to do it, you can use var p = manyUntil(anyChar, str("THING"));
var r = p.Parse("****THING").ToEither(); // [ '*', '*', '*', '*', '*' ] Be warned though, it's a recursive operator - which means if the amount of text being skipped is too large, you'll probably get a stack overflow. You can see the implementation here. |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am still learning the lib.
I am trying to do something simple but I failed to do it so far: I am looking for a parser like noneof but for a string, not for a char or some chars.
In other words, I would like to skip all chars until a string is matched (this string should not be consumed, using attempt probably).
Beta Was this translation helpful? Give feedback.
All reactions