If you want to search across lines for text match using regular expressions, you would need to make use of the carriage return \r\n, \r or \n based on what is the file encoding (Windows, Macintosh or Unix)
Let's take an example of a Windows encoded file with \r\n carriage return,
Search text:This is my file and I want to
search some text across multiple
lines.
- Find What: I want to\r\nsearch
- Regular Expression: Ticked
This is my file and I want to
search some text across multiple
lines.
Search "I want to\r\nsearch" (1 hit in 1 file of 1 searched)
new 15 (1 hit)
Line 1: This is my file and I want to
Notepad++ Search Across Multiple Lines
To search across lines, you will need to use a regex across multiple lines based on the below file types,
- Windows: \r\n
- macOS: \r
- Unix: \n
Tip: Press Ctrl + Shift + F to open Find in files
More Posts related to NotepadPlusPlus,
- Notepad++ Editor alternatives for macOS
- How to add or remove bookmark on a line in Notepad++
- Notepad++ do not show CRLF characters
- Reduce the size of Tabs on Notepad++
- Delete blank lines in a file using Notepad++
- Fix: Notepad++ bottom status bar not visible
- Notepad++ Hex Editor
- How to show End of Line Characters in File using Notepad++
- [Tutorial] Write And Run Python Code In Notepad++ Editor
- How to install XML Tools Plugin Notepad++
- Customizing Notepad++ New Document Line Encoding: CR/LF/CR LF
- How to remove blank lines from a file using Notepad++
- Column Mode Editing in Notepad++
- Convert text to random case using Notepad++
- How to recover unsaved notepad file Windows 10
- How to delete all text after a character or string in Notepad++
- Setting up Cloud feature with Notepad++
- Install Notepad++ silently using Windows Powershell
- Using Document Map in Notepad++
- Enabling Notepad++ Dark Theme
- [Fix] Notepad++ tab not visible (hidden)
- Where are Notepad++ macros stored?
- Multiple line editing in Notepad++
- Alternatives for Notepad++ on Mac in 2021
- [Nopepad++] How to add text at end of each line
More Posts:
- How to check if a port is in use using terminal [Linux or macOS] - MacOS
- [Solution] com.amazonaws.dynamodb.v20120810 MissingAuthenticationToken Key Id or X.509 certificate - AWS
- Informal written computer correspondence acronyms list and meanings - 2022
- Android [SDK Manager] The system cannot find the path specified - Android-Studio
- Convert JSON String to Java GSON Object Example - Java
- How to rerun last command in Zsh shell - HowTos
- How to check the size of a Docker Container - Docker
- Have you noticed MacOS Ventura About this Mac look like Mac OS X - Mac-OS-X