Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: backing up with zsh



Sven Guckes wrote:
>Can I use '|' for "or"?  Example:
>
>   $ echo **/*~*.[Gg][Ii][Ff]|[bB][mM][pP]|[jJ][pP][gG]

echo **/*~*.([Gg][Ii][Ff]|[bB][mM][pP]|[jJ][pP](|[Ee])[gG])

>I'd rather be using something like this:
>
>   $ echo **/*~(*.[bmp|gif|jpeg|jpg]/i)
>
>.. where "/i" means "case insensitive".
>Is there a way with zsh globbing?

No.  zsh has glob patterns, not regular expressions.

-zefram



Messages sorted by: Reverse Date, Date, Thread, Author