summaryrefslogtreecommitdiff
path: root/runtime/doc/eval.txt
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-02-27 23:58:35 +0000
committerBram Moolenaar <Bram@vim.org>2006-02-27 23:58:35 +0000
commit5e3cb7e8699f855193179a8cb799d1087f4a2ac9 (patch)
tree297e019074e2c2b85d5151701fcfae03bf02ceb9 /runtime/doc/eval.txt
parenteddf53b02e2b007208b19c74fb616be2c0839b36 (diff)
downloadvim-5e3cb7e8699f855193179a8cb799d1087f4a2ac9.zip
updated for version 7.0209
Diffstat (limited to 'runtime/doc/eval.txt')
-rw-r--r--runtime/doc/eval.txt16
1 files changed, 9 insertions, 7 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index b6534e0e9..a1c751d08 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 7.0aa. Last change: 2006 Feb 26
+*eval.txt* For Vim version 7.0aa. Last change: 2006 Feb 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3361,12 +3361,6 @@ match({expr}, {pat}[, {start}[, {count}]]) *match()*
"\c" to the pattern to ignore case: >
:let idx = match(haystack, '\cneedle')
<
- When {count} is given use the {count}'th match. When a match
- is found in a String the search for the next one starts on
- character further. Thus this example results in 1: >
- echo match("testing", "..", 0, 2)
-< In a |List| the search continues in the next item.
-
If {start} is given, the search starts from byte index
{start} in a String or item {start} in a |List|.
The result, however, is still the index counted from the
@@ -3377,11 +3371,19 @@ match({expr}, {pat}[, {start}[, {count}]]) *match()*
< result is again "4". >
:echo match("testing", "t", 2)
< result is "3".
+ For a String, if {start} > 0 then it is like the string starts
+ {start} bytes later, thus "^" will match there.
For a String, if {start} < 0, it will be set to 0. For a list
the index is counted from the end.
If {start} is out of range (> strlen({expr} for a String or
> len({expr} for a |List|) -1 is returned.
+ When {count} is given use the {count}'th match. When a match
+ is found in a String the search for the next one starts on
+ character further. Thus this example results in 1: >
+ echo match("testing", "..", 0, 2)
+< In a |List| the search continues in the next item.
+
See |pattern| for the patterns that are accepted.
The 'ignorecase' option is used to set the ignore-caseness of
the pattern. 'smartcase' is NOT used. The matching is always