D
D
Denis2021-07-22 12:57:28
Regular Expressions
Denis, 2021-07-22 12:57:28

Is there a way in Notepad to translate the next line into the previous one (combine lines)?

Is there a way in notepad (Notepad++) using regular expressions / symbols (\r, \n, etc.) to translate the next line into the previous one (one line above), make the continuation of the line, combine them?
For example, it was:
Cell1 Cell2 Cell2
$$$
Should be:
Cell1 Cell2 Cell2 $$$

File format .csv, space separator

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexandroppolus, 2021-07-22
@Alexandroppolus

replace line breaks with spaces
str = str.replace(/\r?\n/g, ' ')

V
Viktor Taran, 2021-07-22
@shambler81

in sublimetext3 you can change it to /s depending on the syntax https://regex101.com/r/Ble3uj/1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question