Find and replace with exclusion

Hello
I have a document that is a mess.

A part of it is that there is a lot of line break in the middle of what is suppose to be full sentences.
is there a way to find and replace every line break that isn’t preceded by a period

example:

Alpha bravo charlie
delta.

Echo.

Foxtrot golf hotel
india.

Here i would want to remove the line break after charlie and india but not the others.

Thanks in advance.

1 Like
  1. make sure you clearly identify line breaks and paragraph breaks : Formatting Marks
  2. using regular expressions, replace all ([^\.])\n with $1

And for background info and variations, see many discussions like this one :

2 Likes

Works perfectly thanks,

How can i ad argument to it ?
Like i want to also exclude" but if i type ([^.][^"])$ it only find .and" and not . or" ?

[^\."]

from previously linked regular expressions, you have :

note: . is a special character in regex, so