summaryrefslogtreecommitdiff
path: root/runtime/doc/pattern.txt
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2011-04-28 19:02:44 +0200
committerBram Moolenaar <Bram@vim.org>2011-04-28 19:02:44 +0200
commit8e5af3e531b986985e2be05e7be652119e76889f (patch)
treefc070684f7cd2d32222d94e180f9ff3b9b2e3f2e /runtime/doc/pattern.txt
parentb453a53b59b55a399f0ff2e473cba796d95a2a0b (diff)
downloadvim-git-8e5af3e531b986985e2be05e7be652119e76889f.tar.gz
Updated runtime files.
Diffstat (limited to 'runtime/doc/pattern.txt')
-rw-r--r--runtime/doc/pattern.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt
index 0fd31d658..84cd7360a 100644
--- a/runtime/doc/pattern.txt
+++ b/runtime/doc/pattern.txt
@@ -1,4 +1,4 @@
-*pattern.txt* For Vim version 7.3. Last change: 2011 Feb 25
+*pattern.txt* For Vim version 7.3. Last change: 2011 Apr 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -651,6 +651,13 @@ overview.
"foobar" you could use "\(foo\)\@!...bar", but that doesn't match a
bar at the start of a line. Use "\(foo\)\@<!bar".
+ Useful example: to find "foo" in a line that does not contain "bar": >
+ /^\%(.*bar\)\@!.*\zsfoo
+< This pattern first checks that there is not a single position in the
+ line where "bar" matches. If ".*bar" matches somewhere the \@! will
+ reject the pattern. When there is no match any "foo" will be found.
+ The "\zs" is to have the match start just before "foo".
+
*/\@<=*
\@<= Matches with zero width if the preceding atom matches just before what
follows. |/zero-width| {not in Vi}