Skip to content

How to detect if the state is in a partial (prefix) match state? #1065

Answered by BurntSushi
zzl0 asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, that's correct, because it looks like you're doing an unanchored search. So that a/t\d/ can match anywhere. Try Input::new(haystack).anchored(Anchored::Yes).

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
8 replies
@BurntSushi
Comment options

@zzl0
Comment options

@BurntSushi
Comment options

Answer selected by BurntSushi
@BurntSushi
Comment options

@zzl0
Comment options

@BurntSushi
Comment options

@BurntSushi
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants