Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ucsd!sdd.hp.com!zaphod.mps.ohio-state.edu!lavaca.uh.edu!menudo.uh.edu!sugar!ficc!peter From: peter@ficc.ferranti.com (Peter da Silva) Newsgroups: comp.misc Subject: Re: MEL - A *Real* Programmer Keywords: Real Programmer, Hacker Message-ID: Date: 8 Nov 90 14:44:46 GMT References: <1990Oct23.235720.16178@nas.nasa.gov> <6089@nisca.ircc.ohio-state.edu> <9397@fy.sei.cmu.edu> Reply-To: peter@ficc.ferranti.com (Peter da Silva) Distribution: usa Organization: Xenix Support, FICC Lines: 21 In article <9397@fy.sei.cmu.edu> prp@sei.cmu.edu (Patrick Place) writes: > In article , peter@ficc.ferranti.com (Peter da Silva) writes: > > In vi, you can search for an identifier "i" with: > > /\/ > But that wasn't quite the operation being asked for. Mo, but it solves the problem that he was looking for a solution for. Trying to use regular expressions to find ends of words is like trying to drive nails with an electric drill. > pattern Norman Diamond asked for is definitely hard to deal with. If you don't artificially constrain regular expressions it's easy. Linefeed is in principle just another character. You can do it in Lex no problem. i[ \t\n] Now you have to make sure the match space includes i but not the following text (i.e., it's not a context-free re). -- Peter da Silva. `-_-' +1 713 274 5180. 'U` peter@ferranti.com