Fork me on GitHub
#instaparse
<
2020-08-14
>
scarrucciu02:08:40

Hello all, is there a way to match on a value, but still use that value for a downstream rule? For example have a string that looks like "ABC*123~EFG*456~HIJ*789" and I would want to nest down a level when I see ABC and HIJ, but I also want to parse the ABC and HIJ are part of the regular segment structure that is using the ~ as the delim

aengelberg02:08:51

Would the lookahead feature help?

scarrucciu02:08:43

was thinking that, would that allow me to essentially parse prospectively without actually pulling the value? Will try it now

scarrucciu02:08:56

that worked! and was way to simple. Thanks for the quick reply