I'd like to do a bulk line-by-line replace on a file within Notepad++ like so:
This is my line of text that I would like to replace
to
"This is my line of text that I would like to replace" +
I tried the following:
Find: ^$
Replace: "\1" +
Find: ^()$
Replace: "\1" +
Find: (^$)
Replace: "\1" +
Any hints? Thanks in advance!
To replace text in Notepad++, follow the steps below. Open the text file in Notepad++. In the top menu bar, click Search and select Replace. In the Replace window, on the Replace tab, enter the text you want to find and the text you want to use as a replacement.
Using Regex to find and replace text in Notepad++ In all examples, use select Find and Replace (Ctrl + H) to replace all the matches with the desired string or (no string). And also ensure the 'Regular expression' radio button is set.
Ctrl+F will bring up the search window. Click on the Find in Files tab. Note: This tab has a specific shortcut – Ctrl+Shift+F – and can be found in the Search menu.
Try to search for ^(.*)$
and replace with "\1" +
The difference between this and your's is that this one captures all characters between the starting and ending of the string. Your regexes simply tries to capture nothing.
Try this:
Find: ^(.*?)$
Replace: "\1" +
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With