I have an issue where I want to parse until i see a =>.
For example,
parser.ParseOrThrow("abc=>def") returns "abc".
However, I also want to do this
parser.ParseOrThrow("a=b=c=>def") returns "a=b=c".
But things that I write always seems to fail because once it sees an =, it then expects a >
Here's a very basic example code of one of the things that I've tried.
I think I somehow never thought about trying Any.Until(Try(String("=>"))) until right after I posted this issue. Anyways, it looks like that solved my problem.
Hello,
I have an issue where I want to parse until i see a
=>
. For example,parser.ParseOrThrow("abc=>def")
returns"abc"
.However, I also want to do this
parser.ParseOrThrow("a=b=c=>def")
returns"a=b=c"
. But things that I write always seems to fail because once it sees an=
, it then expects a>
Here's a very basic example code of one of the things that I've tried.
Thanks!