BurntSushi / fst

Represent large sets and maps compactly with finite state transducers.
The Unlicense
1.78k stars 126 forks source link

[Question] substring matching #134

Open petar-dambovaliev opened 2 years ago

petar-dambovaliev commented 2 years ago

Is there a way to match whether any of the values(strings) have a particular substring?

BurntSushi commented 2 years ago

Sure. You can use a regex like .*substring.*. But it won't be efficient. It will have the visit the entire automaton.