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

Re: Regular expressions in zsh



On 2011-02-18 at 21:38 -0600, Vincent Stemen wrote:
> I was very delighted to discover today that zsh now supports full
> regular expressions in conditional statements, even using the Perl 
> like =~ syntax.  That was one thing that I always wished zsh had.
> 
> My compliments to the chef :-).

zsh has had -pcre-match for a very long time; it's only the =~ operator
which is newish; note that if you're a Perl fan, then you might:

    setopt REMATCH_PCRE

to use PCRE regexps instead of the system regexp library's extended
regexp syntax.

You're welcome. :)  [though I can't claim credit for the original
-pcre-match].



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