Raotiz
Raotiz

Reputation: 11

Adding text to every second line and remove line break

Using notepad++ I can't get it to work

234234

wqeqweqwe

234234

wqeqweqwe

234234

wqeqweqwe

Should be like

234234:wqeqweqwe

234234:wqeqweqwe

234234:wqeqweqwe

but many more

Upvotes: 1

Views: 1445

Answers (1)

Wiktor Stribiżew
Wiktor Stribiżew

Reputation: 626893

You can use the following regex-based replacement:

Find what: ^(.*)\R(.*)
Replace With: $1:$2

The ^ matches the line start, (.*) matches and captures the whole line (Group 1), \R matches any linebreak sequence (\r\n, \r or \n), and then the next line is captured into Group 2.

Then the backreferences $1and $2 restore the lines contents and a colon is inserted in between them.

See the screenshot:

enter image description here

Upvotes: 3

Related Questions