Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mit-eddie!mintaka!spdcc!ima!dirtydog!karl From: karl@ima.isc.com (Karl Heuer) Newsgroups: comp.misc Subject: Re: MEL - A *Real* Programmer Keywords: Real Programmer, Hacker Message-ID: <1990Nov06.223757.29539@dirtydog.ima.isc.com> Date: 6 Nov 90 22:37:57 GMT References: <1990Oct23.235720.16178@nas.nasa.gov> <6089@nisca.ircc.ohio-state.edu> <54296@brunix.UUCP> <5777@suned1.Nswses.Navy.MIL> <8187@gollum.twg.com> <1283@gvgspd.GVG.TEK.COM> <10293@ubc-cs.UUCP> <1990Nov5.082657.28368@tkou02.enet.dec.com> Sender: news@dirtydog.ima.isc.com (NEWS ADMIN) Reply-To: karl@ima.isc.com (Karl Heuer) Distribution: usa Organization: Interactive Systems Lines: 20 In article <1990Nov5.082657.28368@tkou02.enet.dec.com> diamond@tkou02.enet.dec.com (diamond@tkovoa) writes: >In article <10293@ubc-cs.UUCP> buckland@cheddar.ucs.ubc.ca (Tony Buckland) writes: >>No sweat, if you have an editor that can find the pattern >>"non-alphabetic, followed by 'i', followed by non-alphabetic". > >[What about line-boundaries?] I've used a dozen editors that had search >patterns including "beginning" and/or "end" of line, but none that accepted >an "or" operation on line-break "or" character class, in a single search >pattern. This is within the pattern space accepted by egrep. GNU Emacs can do it interactively. I believe the jim and sam editors use egrep-style patterns, too. With the help of a short program from my personal toolbox, I can do it without using any regular expressions at all. If I add in a slightly larger program (116 lines), I can exclude false hits from comments and string literals (`\n' and `%s' being the usual culprits). Karl W. Z. Heuer (karl@ima.isc.com or uunet!ima!karl), The Walking Lint