dloscutoff/pip

Converting empty List to regex

dloscutoff opened this issue · 0 comments

Currently, X[] gives `(?:)`, which matches the empty string. However, since X with a List argument is supposed to generate a regex that matches any of the elements of the list, would it make more sense for X[] to generate a regex that doesn't match anything? One example where it would make a difference is XlNa, which counts the number of regex matches for elements of l in a. If l is empty, it would seem that the answer should be 0, but currently the result is equal to #a+1.