Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: something simple (I hope)
- X-seq: zsh-users 6440
- From: Peter Stephenson <pws@xxxxxxx>
- To: ZSH User List <zsh-users@xxxxxxxxxx>
- Subject: Re: something simple (I hope)
- Date: Mon, 04 Aug 2003 16:55:19 +0100
- In-reply-to: "Andy Spiegl"'s message of "Mon, 04 Aug 2003 17:38:10 +0200." <20030804153810.GA17793@xxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Andy Spiegl wrote:
> Actually in the meantime I found out how to do that:
> files=(/var/tmp/exec.[[:digit:]]*)
>
> But what is still bugging me is that this also matches files like
> /var/tmp/exec.01234.something
>
> I can't figure out how to tell zsh that there shouldn't be anything _after_
> digits. What is the zsh-equivalent of a $ in regular expressions?
The answer to the question you've just asked is `(#e) with the
extendedglob option set'. However, this doesn't get you very far here.
The answer to the question you should have asked is one of the
following:
files=(/var/tmp/exec.<->)
or if you're really attached to [[:digit:]]:
setopt extendedglob
files=(/var/tmp/exec.[[:digit:]]##)
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070
**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential
and/or privileged material.
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by
persons or entities other than the intended recipient is
prohibited.
If you received this in error, please contact the sender and
delete the material from any computer.
**********************************************************************
Messages sorted by:
Reverse Date,
Date,
Thread,
Author