removing line breaks from inside sentences

Associate
Joined
18 Oct 2002
Posts
1,752
Location
Southern England
hi all...

ok so i'm pulling some data out into a string for adding to a word document. the data is in text format but instead of the strings coming out as expected i get strings with sentences with line breaks that are not at the end of the line.


for example

Expecting this:

"the cat sat on the mat. The cat likes milk."

but i get this:
"the cat
sat on
the mat. the cat likes milk."



i'd like to remove the line breaks from inside the sentences but retain the line breaks at the end of the line where the full stops are.

I've been playing with regular expressions but just can't get it working correctly!

Any pointers?

VB.Net by the way.
 
Back
Top Bottom