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,
- How to hide toolbar on Notepad++
- Change the default Line Encoding Notepad++ (CR LF)
- Notepad++ is about to exit prompt message
- How to force quit or kill Notepad++ Process
- Add Blank Lines Between Each Lines in Notepad++
- Install Notepad++ silently using Windows Powershell
- Prettify JSON in Notepad++
- Notepad++ Convert text from lower to upper case
- Must have CSV Plugins for Notepad++
- How to lock Notepad++ tabs?
- Column Mode Editing in Notepad++
- How to change background color in Notepad++
- Notepad++ sort by name with example
- How to rename a tab in Notepad++
- [Solved] Notepad++ Menu Bar Missing
- Where are Notepad++ temp unsaved files stored?
- Notepad++: How to add Quotes to CSV File
- How to check about details of Notepad++ text editor
- How to close all tabs of Notepad++?
- How choose alternate Tab Bar icon in Notepad++
- How to copy file name and path to clipboard in Notepad++
- Change default language highlighting in Notepad++
- Add Line Number before each line in Notepad++ using Column Editor
- Go to Line Number option in Windows Notepad
- How to show End of Line Characters in File using Notepad++
More Posts:
- How to integrate Salesforce CRM Sales and Service with Microsoft Teams - Teams
- Check if a Java Date String is Valid or Not (Java 8) - Java
- Python Program: Use NumPy to generate a random number between 0 and 1 - Python-Programs
- [Fix] Java Exception with Lambda - Cannot invoke because object is null - Java
- Android appcompat_v7 Error retrieving parent for item: No resource found that matches the given name - Android
- How to Escape a character in a Bash command String - Bash
- Ways to Initialize HashMap Collection in Java - Java
- Is Java 20 an LTS Version? - Java