Another great solution is to use the NppExec plugin to add a grep command for Notepad++.
The main advantage over the "Bookmarks" solution is that it runs much faster especially for large files and you don't have to modify your original file. Note that you have to create a small script once to make this feature available in your Notepad++.
My solution example is for Windows and I use findstr, which is a grep-like command tool available on all Windows machines. But you can of course also use any other grep clone of your choice.
Step 1: Install NppExec plugin
Plugins / Plugin Manager / Show Plugin Manager, scroll down to NppExec, select this plugin and click on Install. You may have to restart your Notepad++ to complete the installation process.
Step 2: Create a small script for NppExec
Plugins / NppExec / Execute, enter the following script and save it as "grep":
SET local OUTFILE = "c:\temp\$(FILE_NAME).temp"
INPUTBOX "Input filter string"
cmd /c findstr $(INPUT) "$(FULL_CURRENT_PATH)" >$(OUTFILE)
(please double-check if the path for the OUTFILE works for your environment)
Step 3: Add a menu item for your script (Optional)
Plugins / NppExec / Advanced Options, choose the script "grep" under
Associated script and click OK to save. Restart Notepad as requested by NppExec to complete adding the new menu item.
Step 4: Add a shortcut for your script (Optional)
Settings / Shortcut Mapper / Plugin commands, scroll down to find your script command "grep" and define a shortcut for it. e.g.