diff options
author | Stephane Chazelas <stephane.chazelas@gmail.com> | 2021-09-06 14:43:01 -0700 |
---|---|---|
committer | Bart Schaefer <schaefer@ipost.com> | 2021-09-06 14:43:01 -0700 |
commit | bb61da36aaeeaa70413cdf5bc66d7a71194f93e5 (patch) | |
tree | 4fa62b5e09077ddee7988a2e89fda4154bfd458b /Doc/Zsh | |
parent | a6139bb0a9392c2c90071e7f4013af6e93ceae6c (diff) | |
download | zsh-bb61da36aaeeaa70413cdf5bc66d7a71194f93e5.tar.gz zsh-bb61da36aaeeaa70413cdf5bc66d7a71194f93e5.tar.xz zsh-bb61da36aaeeaa70413cdf5bc66d7a71194f93e5.zip |
45180: clarify doc for POSIX EREs, fix an issue with PCRE when the replacement was empty or generated more than one element
Diffstat (limited to 'Doc/Zsh')
-rw-r--r-- | Doc/Zsh/contrib.yo | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo index e74528341..94059eff6 100644 --- a/Doc/Zsh/contrib.yo +++ b/Doc/Zsh/contrib.yo @@ -4335,7 +4335,7 @@ See also the tt(pager), tt(prompt) and tt(rprompt) styles below. findex(regexp-replace) item(tt(regexp-replace) var(var) var(regexp) var(replace))( Use regular expressions to perform a global search and replace operation -on a variable. POSIX extended regular expressions are used, +on a variable. POSIX extended regular expressions (ERE) are used, unless the option tt(RE_MATCH_PCRE) has been set, in which case Perl-compatible regular expressions are used (this requires the shell to be linked against the tt(pcre) @@ -4353,6 +4353,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 using POSIX EREs, the tt(^) or word boundary operators +(where available) may not work properly. ) findex(run-help) item(tt(run-help) var(cmd))( |