I am trying to find and delete a line using Notepad++
I need to find lines in this file (UNIX Format) that match the string \'#RedirectMatch Permanent
Combining the best from all the answers
If it supports standard regex...
find:
^.*#RedirectMatch Permanent.*$
replace:
Replace with nothing.
Step 1
Search → Find → (goto Tab) MarkFind what: ^Session.*$ Bookmark lineRegular expression (under Search Mode)Mark All (this will find the regex and highlights all the lines and bookmark them) Step 2
Search → Bookmark → Remove Bookmarked LinesProvide the following in the search dialog:
Find What: ^$\r\n
Replace With: (Leave it empty)
Click Replace All
Using the "Replace all" functionality, you can delete a line directly by ending your pattern with:
$\n? $(\r\n)?For instance, in your case :
.*#RedirectMatch Permanent.*$\n?