Po-Yi Chou

undergraduate in EECS in NCTU


Project maintained by poyichou Hosted on GitHub Pages — Theme by mattgraham

Home Notes Scripts Code Contact Blog

Notes-Vim

Example searches

/foo\(\(foo\)\@!\_.\)\{-}\d\{3}.\d\{3} ms\(\(foo\)\@!\_.\)\{-}foo

Search “xxx.xxx ms” between two “foo” (may be in diff lines) while other “foo” excluded

explain
\@! match zero width for preceding keyword
\_. any character including newline
\{-} match as few as possible
\d digit
\{3} repeat 3 times
\(\(foo\)\@!\_.\) any word excluding “foo”