home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / gnu / emacs / help / 4141 < prev    next >
Encoding:
Text File  |  1992-09-15  |  1.3 KB  |  31 lines

  1. Path: sparky!uunet!noc.near.net!news.Brown.EDU!qt.cs.utexas.edu!yale.edu!spool.mu.edu!sdd.hp.com!swrinde!gatech!concert!sas!mozart.unx.sas.com!saswfk
  2. From: saswfk@thurstne.unx.sas.com (Warren F. Kuhfeld)
  3. Newsgroups: gnu.emacs.help
  4. Subject: Re: Get rid of double words - looking for .el file
  5. Keywords: double words
  6. Message-ID: <BuMLt2.Jn4@unx.sas.com>
  7. Date: 15 Sep 92 15:31:50 GMT
  8. References: <hfaester.716566184@Physik.TU-Muenchen.DE>
  9. Sender: news@unx.sas.com (Noter of Newsworthy Events)
  10. Organization: SAS Institute Inc. Cary NC
  11. Lines: 16
  12. Originator: saswfk@thurstne.unx.sas.com
  13. Nntp-Posting-Host: thurstne.unx.sas.com
  14.  
  15.  
  16. In article <hfaester.716566184@Physik.TU-Muenchen.DE>, hfaester@Physik.TU-Muenchen.DE (Hannes Faestermann) writes:
  17. |> I'm looking for an emacs lisp file that allows cleaning text files
  18. |> from double occurences of words like in 'In the the summertime...'. 
  19.  
  20. Try this:
  21.  
  22. (defun double ()       
  23.   "Search for double words."
  24.   (interactive)
  25.   (re-search-forward "\\(\\b[a-z]+\\b\\)\\W+\\b\\1\\b"))
  26. -- 
  27. ----------------------------------------------------------------------
  28. Warren F. Kuhfeld          Statistical R & D      (919) 677-8000 x7922
  29. saswfk@unx.sas.com         SAS Institute Inc.     (919) 677-8123 (Fax)
  30.                            Cary, NC 27513-2414
  31.