diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2007-05-01 22:05:03 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2007-05-01 22:05:03 +0000 |
commit | 7f03c3d851c571d86d18c701d882c13ad5d06c6c (patch) | |
tree | 17edf1709daf6247f505f82d12bbd5c67fa69906 /Doc/Zsh/cond.yo | |
parent | eb4c3d4bf2e6b13078afd0820375dc02a2eb2a1f (diff) | |
download | zsh-7f03c3d851c571d86d18c701d882c13ad5d06c6c.tar.gz zsh-7f03c3d851c571d86d18c701d882c13ad5d06c6c.tar.xz zsh-7f03c3d851c571d86d18c701d882c13ad5d06c6c.zip |
23375: Phil Pennock: =~, zsh/regex etc. etc.
Diffstat (limited to 'Doc/Zsh/cond.yo')
-rw-r--r-- | Doc/Zsh/cond.yo | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Doc/Zsh/cond.yo b/Doc/Zsh/cond.yo index 49e42d50d..1b7630d78 100644 --- a/Doc/Zsh/cond.yo +++ b/Doc/Zsh/cond.yo @@ -109,6 +109,20 @@ backward compatibility and should be considered obsolete. item(var(string) tt(!=) var(pattern))( true if var(string) does not match var(pattern). ) +item(var(string) tt(=~) var(regexp))( +true if var(string) matches the regular expression +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 +regular expression using the tt(zsh/regex) module. +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 +subexpressions within the pattern; otherwise, the scalar parameter +tt(MATCH) is set to the substring that matched the pattern and +and the array tt(match) to the substrings that matched parenthesised +subexpressions. +) item(var(string1) tt(<) var(string2))( true if var(string1) comes before var(string2) based on ASCII value of their characters. |