Daniel Shahaf wrote on Sat, 13 Jun 2020 10:09 +00:00: > Branko Čibej wrote on Sat, 13 Jun 2020 09:51 +00:00: > > On 13.06.2020 11:15, Daniel Shahaf wrote: > > > Daniel Sahlberg wrote on Fri, 12 Jun 2020 21:14 +0200: > > >>> Care to move this over to dev@ with a patch? > > >>> > > >> Will do, it might take a few days. > > >> > > >> Thanks to the other users for their suggestions but I don't think they'll > > >> be general enough for my use case. > > > Care to explain why patterns with negated character classes wouldn't work? > > > > There's a difference between saying, "ignore everything except '*.doc'" > > and "ignore '*.[^d][^o][^c]'". > > Did you read my previous message in this thread? If you have, then > you've just committed a strawman, and that's unlike you. > > (And for the record, the complement of «*.doc» is > «*[^c]|*[^o]c|*[^d]oc|*[^.]doc|».) > > > You can't get the same result with negated character classes as with > > pattrerns. > > I'm aware of that, and have said so in so many words, but the problem > statement was "Ignore everything except XX* and YY*", and that _can_ be > achieved with negated patterns.
s/negated patterns/negated character classes/ > At this point I'd rather wait for Daniel to answer my question and > clarify his problem statement.