Path: utzoo!attcan!uunet!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!rutgers!mcnc!uvaarpa!mmdf From: worley@compass.com (Dale Worley) Newsgroups: comp.lang.perl Subject: What I want in regular expressions Message-ID: <1990Jun27.144859.15573@uvaarpa.Virginia.EDU> Date: 27 Jun 90 14:48:59 GMT Sender: mmdf@uvaarpa.Virginia.EDU (Uvaarpa Mail System) Reply-To: worley@compass.com Organization: The Internet Lines: 33 There are a number of features that could be put into regexp matching that would make life easier: a \- b Match any string which matches a but is not matched (in its entirity) by b. \- b Match the null string if what follows this position is not matched by b. a \: b \; c Match b but only if its left context is matched by a and its right context is matched by c. This would be useful for simplifying s/ / / constructions: s/(a)b(c)/\1d\2/ becomes s/a\:b\;c/d/ Probably, a should be included in $` and c in $'. How hard would this be to do? Dale Worley Compass, Inc. worley@compass.com -- If people think nature is their friend, then they sure don't need an enemy. --Kurt Vonnegut