On 13.06.2020 12:09, Daniel Shahaf wrote:
> 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|».)
|? There's no such operator in glob patterns.
>> You can't get the same result with negated character classes as with
> 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.
Well ok, sure, for any concrete pattern you can theoretically construct
its inverse with negated character classes (assuming an "or" operator
exists). But it's not always trivial nor practical. I think it's worth
exploring possible solutions that are also user-friendly.
> At this point I'd rather wait for Daniel to answer my question and
> clarify his problem statement.
I rather suspect that XX* and YY* were just general examples, not
Received on 2020-06-13 12:16:56 CEST