Add Prefix or Suffix using Notepad++
Notepad++ is a great text document editor.
When a prefix or suffix need to be added to all lines in a text document, search and replace function of Notepad++ can be used.
Check out the image which shows how to do this.
In Find What enter "^(.+)$" without the quotes, in replace with column enter "<Prefix>\1" to add prefix or "\1<Suffix> to add suffix. Where <Prefix> and <Suffix> are the data you want to insert.
Also, make sure to keep the search mode in "Regular expression"
That should do the trick!!!
When a prefix or suffix need to be added to all lines in a text document, search and replace function of Notepad++ can be used.
Check out the image which shows how to do this.
In Find What enter "^(.+)$" without the quotes, in replace with column enter "<Prefix>\1" to add prefix or "\1<Suffix> to add suffix. Where <Prefix> and <Suffix> are the data you want to insert.
Also, make sure to keep the search mode in "Regular expression"
That should do the trick!!!
Thank you as well!
ReplyDeleteworks fine
ReplyDeleteIn a very large text file I need to prefix every line with the text: PSCMD.EXE " (including the quote).
ReplyDeleteTwo weeks ago I did this successfully In ++Notepad by going to Search / Find / Replace and replacing every occurrence of ^(.+)$ as instructed.
Today it does not work. Every line in the file finishes up with my prefix but all the existing data is gone.