Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!caen!uwm.edu!linac!att!cbnews!cbnewsm!cadman From: cadman@cbnewsm.att.com (jerome.schwartz) Newsgroups: comp.editors Subject: repeated character editing Keywords: vi sed Message-ID: <1991Mar28.181335.7813@cbnewsm.att.com> Date: 28 Mar 91 18:13:35 GMT Distribution: usa Organization: AT&T Bell Laboratories Lines: 17 How would I do a simple edit command, vi map or sed script, to replace all occurrences of repeated characters in a file with one of each of the characters. ie: This: AAAAPPPPLLLLEEEE ppppiiiieeee to this: APPLE pie Thanks in advance, Jerry ********************************************************************** Jerome Schwartz | Standard Disclaimer: AT&T Bell Laboratories | Crawfords Corner Rd. | Views expressed are my own and Holmdel, N.J. 07733 | do not necessarily reflect those Phone : (201)-949-8560 | of my employer. **********************************************************************