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

Re: REMATCH_PCRE with zsh built without pcre support



On 2017-04-01 at 14:53 -0700, Bart Schaefer wrote:
> I'd personally be more inclined to do away with REMATCH_PCRE and that
> =~ special-case entirely, and require explicit use of the -pcre-match
> operator (or a shorter equivalent) when you want those semantics.

That's a shame.  Perl introduced the syntax and I originally wrote the
Zsh =~ code to use the existing zsh/pcre module.  It was only
reluctantly that I added the zsh/regex module so that =~ could match
Bash's behavior by default, because folks felt that compatibility with
Bash was more important than being powerful.  Almost everything I do
with =~ in Zsh uses REMATCH_PCRE.

> It's already been pointed out in another thread that =~ doesn't work at
> all if the shell is built with the default modules and without dynamic
> linking support.

I'll have to hunt down that thread and see what I can do about that.

-Phil



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