Grep question
Grep question
- Subject: Grep question
- From: Michelle Steiner <email@hidden>
- Date: Tue, 8 May 2001 18:12:34 -0700
Sometimes, I receive mail that has been reformatted poorly; paragraph
returns have been stripped, so the period at the end of a sentence is
followed by the first character of the following paragraph. Sentences in
the middle of the paragraph are followed by a space.
So, what I need is a grep pattern to insert a carriage return after a
period if that period is not followed by a space.
Actually, it's a bit more complex than that because some paragraphs end
with a quote, so if the sentence ends with a period and a quote mark, and
a character other than a space, I need to insert the carriage return
after that, but if it ends with a period and a quote mark, and a space,
there shouldn't be a return after that.
--Michelle
----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------