I have searched the forum and couldn't find exactly what I am looking for.
Before Data:
text
text
text
text
blank line
blank line
After Data:
text text text text
Blank Line
text text text text
Blank Line
The Text Lines can be almost any amount.
The blank lines can also be any amount.
Concatenate lines of text omitting blanks lines
Moderators: AmigoJack, bbadmin, helios, MudGuard
-
ben_josephs
- Posts: 2464
- Joined: Sun Mar 02, 2003 9:22 pm
Replace All repeatedly until it beeps.Find what: ^(.+)\n(.+)
Replace with: \1 \2
[X] Regular expression
Replace All
Then
Replace All repeatedly until it beeps.Find what: \n\n
Replace with: \n
[X] Regular expression
Replace All
These assume you are using Posix regular expression syntax:
Configure | Preferences | Editor
[X] Use POSIX regular expression syntax
Replace (i.e. a line-break followed by something other than a line-break) by (i.e the "something other than a line-break)
(in Textpad: Posix Regular Expression Syntax must be checked!)
Code: Select all
\n([^\n])Code: Select all
\1(in Textpad: Posix Regular Expression Syntax must be checked!)