flashtext icon indicating copy to clipboard operation
flashtext copied to clipboard

Dealing with multiple (optional) tokens)

Open kootenpv opened this issue 6 years ago • 0 comments

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?

kootenpv avatar Nov 15 '17 21:11 kootenpv