To match a character, you can put the character inside the brackets, for example [.] . To not match it, you can start the list of characters with a caret such as [^.] . This will effectively match any character that is not . .
In your particular case, you want to match \r\n which does not . in front of him. In combination with the above, you can use:
[^.]\r\n
To replace it, you will want to βcaptureβ a symbol that is not a period in order to keep it in the replacement. You can write it by enclosing it in parentheses, for example ([^.]) .
Using Regex.Replace() , it will be something like this:
yourString = Regex.Replace(yourString, @"([^.])\r\n", "$1");
$1 matches the character and is replaced with a string again, now deprived of \r\n .
source share