Reputation: 21
I want to add a text (eg. HELLO) between each Line
For example:
Line 1
Line 2
Line 3
make it:
Line 1
HELLO
Line 2
HELLO
Line 3
HELLO
Upvotes: 0
Views: 4497
Reputation: 254
My first thought would be to use a form of Regular Expression in the Find/Replace. I expect that your sample, used here, is not exactly what you're trying to do, but to solve the sample, try the following in the Find/Replace dialog.
([\d]{1})[\s]{1}
This will find 1 digit, followed by 1 space, and replace it with the 1 digit, followed by " HELLO "
See an explaination of the regular expression pieces, here: https://regex101.com/r/wW8cG2/1
Upvotes: 0
Reputation: 91373
You could do:
(\R)
$1HELLO$1
\R
stands for any kind of line break, the added lines will have the same line break as the original lines.
Upvotes: 0
Reputation: 1132
Upvotes: 2
Reputation: 1562
A simple search/replace will do the job here, looking for \r\n
and replacing it with \r\nHELLO\r\n
. The important thing is to have selected the Extended Search mode (at the bottom of the search/replace dialog), so the control characters can be specified in this way.
Upvotes: 0