• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Grep question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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. |
----------------------------------------------------------------------


  • Prev by Date: TECSoft Announces New AppleScript Training CD
  • Next by Date: Re: Scripting Fetch, help
  • Previous by thread: TECSoft Announces New AppleScript Training CD
  • Next by thread: More Eudora talk
  • Index(es):
    • Date
    • Thread