Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Pattern matching
- X-seq: zsh-workers 7322
- From: "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- To: "Peter Stephenson" <pws@xxxxxxxxxxxxxxxxx>, "Zsh hackers list" <zsh-workers@xxxxxxxxxxxxxx>
- Subject: Pattern matching
- Date: Fri, 30 Jul 1999 13:27:51 +0400
- Importance: Normal
- In-reply-to: <9907281225.AA34297@xxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
>
> Just discovered this. It will have to wait to be fixed --- it's been
> around for years and no-one's complained. I'm planning a rewrite of the
> pattern matching code anyway.
>
Just using the occasion. I once suggested to replace ad hoc code with conversion
to standard regexps. I believe, now a days all systems have standard POSIX
regexps available. This will be much more clean and I hope faster. Zsh patterns
are pretty close to normal regular experssions so it should be not a problem
(even SAMBA takes this course for wildcard matching :-) Just some points:
- currently code scans pattern for every match. This may really be inefficient
for globbing (even more so, as code has to dequote string every time). Using
rgexps pattern can be compiled once - for recursive globbing quite a gain.
- this may automatically solve the original problem of this post. Regexps are
required to match the longest string, even if every subregexp is not the longest
one.
regards
/andrej
Messages sorted by:
Reverse Date,
Date,
Thread,
Author