Replies: 1 comment 1 reply
-
You probably have to match byte at a time. But for capture groups, you probably need the full match to be in a contiguous region of memory. Otherwise, it seems like you want streaming searches, which is a big can of worms. Search the issue tracker. (I'm on mobile or else I would link the relevant issues.) Also, your code doesn't look like it will compile... |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm quite new to Rust, so please let me know if there's something I'm missing (a lot of this is pseudocode and doesn't actually compile, but I hope it illustrates my point):
I have a dead-simple pattern and I want to grab it from a
BufRead
, and here's what I have so far:So what I need to do is:
inp.consume
by the length of the matchinp.consume
it and then continue advancing with anotherinp.fill_buf
Is there a better way to do this than advancing the DFA on bytes?
Beta Was this translation helpful? Give feedback.
All reactions