From owner-freebsd-hackers Mon Jul 5 2:51:25 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from mailgate.rz.uni-karlsruhe.de (nz41.rz.uni-karlsruhe.de [129.13.197.5]) by hub.freebsd.org (Postfix) with ESMTP id B1FA2152E3 for ; Mon, 5 Jul 1999 02:50:30 -0700 (PDT) (envelope-from uk1o@rz.uni-karlsruhe.de) Received: from rzstud1.rz.uni-karlsruhe.de (exim@rzstud1.rz.uni-karlsruhe.de [129.13.197.183]) by mailgate.rz.uni-karlsruhe.de with esmtp (Exim 2.04 #3) id 1115M2-0003Wc-00; Mon, 5 Jul 1999 11:48:04 +0200 Received: from uk1o by rzstud1.rz.uni-karlsruhe.de with local (Exim 2.12 #1) id 1115Lw-0006ow-00; Mon, 5 Jul 1999 11:47:56 +0200 Message-ID: <19990705114754.A23278@rz.uni-karlsruhe.de> Date: Mon, 5 Jul 1999 11:47:54 +0200 From: Hannah Schroeter To: Todd Vierling , Jamie Howard Cc: freebsd-hackers@freebsd.org, tech-userlevel@netbsd.org, tech@openbsd.org Subject: Re: Repalcement for grep(1) Mail-Followup-To: Todd Vierling , Jamie Howard , freebsd-hackers@freebsd.org, tech-userlevel@netbsd.org, tech@openbsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i In-Reply-To: ; from Todd Vierling on Sat, Jul 03, 1999 at 05:00:41PM -0400 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello! On Sat, Jul 03, 1999 at 05:00:41PM -0400, Todd Vierling wrote: > [...] > Hm. Adding ^ and $ should work, provided you don't specify either > REG_NOTBOL or REG_NOTEOL. (I assume that (foo) above, including the parens, > is the RE. With the parens, it depends whether you're using standard REs or > extended REs. :) But be careful about adding ^ and $ to something like (extended syntax) foo|bar. ^foo|bar$ is wrong, and ^(foo|bar)$ works HERE but not always, as when the original regex uses \number backreferences, you must patch them (increase by one), and you're hosed if \9 is already used. > [...] Regards, Hannah. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message