Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: <n> == <n->?
- X-seq: zsh-workers 10485
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: <n> == <n->?
- Date: Tue, 04 Apr 2000 20:32:18 +0100
- In-reply-to: "Johan Sundstr m"'s message of "Tue, 04 Apr 2000 19:00:42 +0200." <Pine.GSO.4.02.10004041813220.28633-100000@xxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Johan Sundstr m wrote:
> Another thing I forgot at first when on the subject: for quite some time
> now, <x-y> has been ungreedy about its matches, to my disappointment. This
> means that <1-2>* will match 1, 2, 10 through 29, and so on, instead of a
> single, closed range, as at leas I would hope when constructing such a
> pattern.
I thought about this when I changed it, and came to the conclusion that the
new behaviour was a simple matter of consistency with patterns. *
guarantees to match anything at all, so 123potato is bound to match <1-2>*.
I don't think it's an option to make * not match numbers in this one case.
You probably don't need to be told all the workarounds; I suppose the
simplest is <1-2>[^0-9]*.
--
Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
Work: pws@xxxxxxxxxxxxxxxxxxxxxxxxx
Web: http://www.pwstephenson.fsnet.co.uk
Messages sorted by:
Reverse Date,
Date,
Thread,
Author