How to remove all abnormally inserted line breaks? Keep normal line breaks

E.g:

'What are you
doing?' she asked.
‘I’m having breakfast,' I repeated.

This is the result i want:

'What are you doing?' she asked.
‘I’m having breakfast,' I repeated.

Line breaks without any punctuation marks are abnormal line breaks. This usually appears in text copied from PDF.
I used this website:removelinebreaks

This should work using a KM Search and Replace action:

Search For using Regular Expressions:
(?m)([^?!.,:;])\R

Replace With:
\1𝍖
where "𝍖" is a SPACE character.

7 Likes