Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug in filename expansion
- X-seq: zsh-workers 1388
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: rayvt@xxxxxxxxxxxxxxx (Ray Van_Tassle)
- Subject: Re: Bug in filename expansion
- Date: Thu, 20 Jun 1996 22:48:08 +0200 (MET DST)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <199606201529.KAA12470@xxxxxxxxxxxxxxxxxx> from Ray Van_Tassle at "Jun 20, 96 10:29:05 am"
- Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary
- Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368
> >ls zz*
> zzayy zzbyy zzxyy
>
> >ls zz(a|b)yy
> zzayy zzbyy
>
> >ls zz^(a|b)yy
> zsh: no match
>
> Seems wrong.
[...]
> But the 3rd command should give me the files that start with "zz", then have
> a character OTHER than "a" or "b", and end with "yy".
> It should give me "zzxyy", but it doesn't.
No, it isn't wrong. ^pattern matches if pattern does not match. You should
use groupping.
zz^(a|b)yy is the same as zz^((a|b)yy) and zz(^(a|b))yy is what you want.
Zoltan
Messages sorted by:
Reverse Date,
Date,
Thread,
Author