How do I search for a text string that spans multiple lines?
expression atom. For example, to search for the text string “Hello World”, you can use the following search command: /Hello\_sWorld This will match the word “Hello” followed by a newline character and then the word “World” at the beginning of the next line. This will also match the word “Hello” immediately followed by a space character and then the word “World”. When searching for the “Hello World” string, to include the space characters at the end and beginning of the line, you can use the following search command: /Hello\_s\+World For more information, read :help 27.8 :help pattern-atoms :help /\_ :help pattern-searches 11.22.
Related Questions
- Search and LOG text to file Wizard This Wizard allows you to scan your drawings for a specific text string, and report all occurences of that text to a text file. The Search string is Case Sensitive, and you can use wildcards like * and ?.
- Can I search through all folders for messages that contain a text string?
- How do I search for a text string that spans multiple lines?