about summary refs log tree commit diff
path: root/Doc/Zsh
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2023-05-13 00:56:48 +0200
committerOliver Kiddle <opk@zsh.org>2023-05-13 00:56:48 +0200
commitf3f371deb376478176866fd770fbcf9bc0d0609f (patch)
treef52fbb7f254b7b2e8570eb3f7c17bbfcfd93e64c /Doc/Zsh
parentb62e911341c8ec7446378b477c47da4256053dc0 (diff)
downloadzsh-f3f371deb376478176866fd770fbcf9bc0d0609f.tar.gz
zsh-f3f371deb376478176866fd770fbcf9bc0d0609f.tar.xz
zsh-f3f371deb376478176866fd770fbcf9bc0d0609f.zip
51728: assign pcre named capture groups to a hash
Diffstat (limited to 'Doc/Zsh')
-rw-r--r--Doc/Zsh/mod_pcre.yo10
1 files changed, 6 insertions, 4 deletions
diff --git a/Doc/Zsh/mod_pcre.yo b/Doc/Zsh/mod_pcre.yo
index c2817f519..6d073985d 100644
--- a/Doc/Zsh/mod_pcre.yo
+++ b/Doc/Zsh/mod_pcre.yo
@@ -20,12 +20,12 @@ including those that indicate newline.
 )
 findex(pcre_study)
 item(tt(pcre_study))(
-Studies the previously-compiled PCRE which may result in faster
-matching.
+Requests JIT compilation for the previously-compiled PCRE which
+may result in faster matching.
 )
 findex(pcre_match)
 item(tt(pcre_match) [ tt(-v) var(var) ] [ tt(-a) var(arr) ] \
-[ tt(-n) var(offset) ] [ tt(-b) ] var(string))(
+[ tt(-A) var(assoc) ] [ tt(-n) var(offset) ] [ tt(-b) ] var(string))(
 Returns successfully if tt(string) matches the previously-compiled
 PCRE.
 
@@ -36,7 +36,9 @@ substrings, unless the tt(-a) option is given, in which
 case it will set the array var(arr).  Similarly, the variable
 tt(MATCH) will be set to the entire matched portion of the
 string, unless the tt(-v) option is given, in which case the variable
-var(var) will be set.
+var(var) will be set. Furthermore, any named captures will
+be stored in the associative array tt(.pcre.match) unless an
+alternative is given with tt(-A).
 No variables are altered if there is no successful match.
 A tt(-n) option starts searching for a match from the
 byte var(offset) position in var(string).  If the tt(-b) option is given,