Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!ucbvax!decwrl!ogicse!ucsd!ucsdhub!hp-sdd!hp-pcd!hpcvlx!bill From: bill@hpcvlx.cv.hp.com (Bill Frolik) Newsgroups: gnu.emacs Subject: Re: regexp help Message-ID: <110960002@hpcvlx.cv.hp.com> Date: 2 Feb 90 18:00:13 GMT References: <15904@well.UUCP> Organization: Hewlett-Packard Co., Corvallis, OR, USA Lines: 19 > Given a line like this: > font.c, down.c, arc.c > how do I replace the ", " with a newline so each file name > is on a different line? > It works if I define a keyboard macro, but I can't > figure out how to do it with either string-replace or > regexp-replace. > greg Strockbine When you specify a replacement string, quote the newline character with ^Q. In your example you can use replace-string to search for ", " and replace it with "^Q^J". ________________________________________ Bill Frolik Hewlett-Packard Co. hp-pcd!bill Corvallis, Oregon