Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Re: regexp-replace and ^, word boundary or look-behind operators
Stephane Chazelas wrote on Tue, 17 Dec 2019 11:11 +00:00:
> +++ b/Doc/Zsh/contrib.yo
> @@ -4301,6 +4301,9 @@ and arithmetic expressions which will be
> replaced: in particular, a
> reference to tt($MATCH) will be replaced by the text matched by the
> pattern.
>
> The return status is 0 if at least one match was performed, else 1.
> +
> +Note that if not using PCRE, using the tt(^) or word boundary operators
> +(where available) may not work properly.
Suggest to avoid the double negative:
1. s/not using PCRE/using POSIX ERE's/
2. Add "(ERE's)" after "POSIX extended regular expressions" in the first paragraph
I'll push a minor change to that first paragraph in a moment.
> )
> +++ b/Functions/Example/zpgrep
> @@ -2,24 +2,31 @@
> +eval $1=\$5
How about «: ${(P)1::="$5"}» to avoid eval?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author