Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!helios!archone!byron From: byron@archone.tamu.edu (Byron Rakitzis) Newsgroups: comp.editors Subject: Re: Multiple line regexps Keywords: regexp, multiple lines Message-ID: <16790@helios.TAMU.EDU> Date: 3 Jun 91 03:17:10 GMT References: <1991Jun2.231351.10229@trl.oz.au> Sender: usenet@helios.TAMU.EDU Distribution: comp Organization: College of Architecture, Texas A&M University. Lines: 17 In article <1991Jun2.231351.10229@trl.oz.au> soh@andromeda.trl.OZ.AU (kam hung soh) writes: >I would like to write a regular expression which can look for patterns >longer than one line. For example, I want to find the first line of >each paragraph. Most Unix utilities are line based, so no dice. However, emacs will let you put a literal newline in the regexp, just like any other character. Simply escape it with a C-q first. I would like to write a "stream sam", after having seen and read about the sam text editor. It seems to me that sed's usefulness is very limited in certain circumstances, and writing obfuscated sed scripts making use of the hold space just doesn't do it for me. -- Byron Rakitzis byron@archone.tamu.edu