Is there a way to remove hard line breaks in a selected text?

Is there a plugin or anything that can remove hard line breaks, so that a text like:

I have sometimes
texts that I
copy and past into
my Obsidian

converts into:

I have sometimes texts that I copy and past into my Obsidian

A little regex knowledge would help. Otherwise maybe the Linter plugin could be of assistance.
Someone should put up a Showcase/Share help sheet that deals with trailing whitespaces, line-ending hyphens, removal of line breaks/carriage returns.
I could do it, but it would involve too much explanation for newbies.
Install non-Obsidian apps like Notepad++, Obsidian plugins like Apply Patterns (which can execute dozens of rules in succession) and look up StackOverflow forum threads on the subject.
And by all means, learn a little regex and try them out on regex101.com.

E.g.:
Match → Replace (regex)
(-\n)nothing
(\r\n)+|\r+|\n+|\t+space character

The Text Format community plugin says it can (I haven’t tried it yet).

I have it written up now:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.