flashtext
flashtext copied to clipboard
Dealing with multiple (optional) tokens)
How do you recommend dealing with multiple (optional) tokens?
Let's say we want to extract abc
or a subset of it; the regex would be:
(a)?(b)?(c)?
This will allow matching all combinations:
abc
ab
ac
bc
b
c
a
Is the best we can do having to add all combinations, including ""
and then joining them?