I am trying to search for numeric values in files. I use / command to start my search (/34587). However I need to add more then one search criteria (i.e. finding value 3487 and 09087 for instance). What is the search command in vim for such scenarios? thank you
1 Answer
There's no "special command" for that. You use just the same /
(or ?
) but along with a special pattern called "a regular expression".
An introduction to this topic is written in the chapter 27 of Vim User Manual (:h usr_27.txt
). Specifically, a section 27.5 "Alternatives" (:h 27.5
). So in your case it is /3487\|09087
.
-
-
1@henrietta A great intro to regular expressions (or regex) in vim is vimregex.com. It helped me a lot when I was first learning regex Sep 24, 2019 at 19:19
-