summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--Doc/Zsh/cond.yo2
-rw-r--r--Doc/Zsh/mod_pcre.yo4
-rw-r--r--Doc/Zsh/mod_regex.yo4
4 files changed, 15 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 2f00b3d1b..8cc9545be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-01-15  Peter Stephenson  <pws@csr.com>
+
+	* 26312: Phil Pennock: Doc/Zsh/cond.yo, Doc/Zsh/mod_pcre.yo,
+	Doc/Zsh/mod_regex.yo: Document no variables altered on failed
+	match.
+
 2009-01-13  Peter Stephenson  <pws@csr.com>
 
 	* 26304: Mikael Magnusson: configure.ac: logical correction
@@ -10907,5 +10913,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.4508 $                         
+* $Revision: 1.4509 $                         
 *****************************************************
diff --git a/Doc/Zsh/cond.yo b/Doc/Zsh/cond.yo
index 1a4d5a71c..9d8f145f8 100644
--- a/Doc/Zsh/cond.yo
+++ b/Doc/Zsh/cond.yo
@@ -115,6 +115,8 @@ var(regexp).  If the option tt(RE_MATCH_PCRE) is set
 var(regexp) is tested as a PCRE regular expression using
 the tt(zsh/pcre) module, else it is tested as a POSIX
 extended regular expression using the tt(zsh/regex) module.
+Upon successful match, some variables will be updated; no variables
+are changed if the matching fails.
 If the option tt(BASH_REMATCH) is set the array
 tt(BASH_REMATCH) is set to the substring that matched the pattern
 followed by the substrings that matched parenthesised
diff --git a/Doc/Zsh/mod_pcre.yo b/Doc/Zsh/mod_pcre.yo
index f6131f5e4..33b864478 100644
--- a/Doc/Zsh/mod_pcre.yo
+++ b/Doc/Zsh/mod_pcre.yo
@@ -26,13 +26,15 @@ item(tt(pcre_match) [ tt(-v) var(var) ] [ tt(-a) var(arr) ] var(string))(
 Returns successfully if tt(string) matches the previously-compiled
 PCRE.
 
-If the expression captures substrings within parentheses,
+Upon successful match,
+if the expression captures substrings within parentheses,
 tt(pcre_match) will set the array var($match) to those
 substrings, unless the tt(-a) option is given, in which
 case it will set the array var(arr).  Similarly, the variable
 var(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.
+No variables are altered if there is no successful match.
 )
 enditem()
 
diff --git a/Doc/Zsh/mod_regex.yo b/Doc/Zsh/mod_regex.yo
index 08e92ab9f..4081810ed 100644
--- a/Doc/Zsh/mod_regex.yo
+++ b/Doc/Zsh/mod_regex.yo
@@ -8,9 +8,11 @@ startitem()
 findex(regex-match)
 item(var(expr) tt(-regex-match) var(regex))(
 Matches a string against a POSIX extended regular expression.
-The matched portion of the string will normally be placed in the tt(MATCH)
+On successful match,
+matched portion of the string will normally be placed in the tt(MATCH)
 variable.  If there are any capturing parentheses within the regex, then
 the tt(match) array variable will contain those.
+If the match is not successful, then the variables will not be altered.
 
 For example,