I’m using Notepad++ and I can’t figure this out :
I have numerous lines all starting with http
. I need to add some text in front of it in every line. Also, I need to add different text to the end of each line. Each line ends differently.
What is the fastest way to add text to the start and end of each line?
13 Answers
Follow these steps:
- Press Ctrl+H to bring up the Find/Replace Dialog.
- Choose the
Regular expression
option near the bottom of the dialog.
To add a word, such as test
, at the beginning of each line:
- Type
^
in theFind what
textbox- Type
test
in theReplace with
textbox- Place cursor in the first line of the file to ensure all lines are affected
- Click
Replace All
button
To add a word, such as test
, at the end of each line:
- Type
$
in theFind what
textbox- Type
test
in theReplace with
textbox- Place cursor in the first line of the file to ensure all lines are affected
- Click
Replace All
button