Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Jul 1999 11:47:54 +0200
From:      Hannah Schroeter <uk1o@rz.uni-karlsruhe.de>
To:        Todd Vierling <tv@pobox.com>, Jamie Howard <howardjp@wam.umd.edu>
Cc:        freebsd-hackers@freebsd.org, tech-userlevel@netbsd.org, tech@openbsd.org
Subject:   Re: Repalcement for grep(1)
Message-ID:  <19990705114754.A23278@rz.uni-karlsruhe.de>
In-Reply-To: <Pine.NEB.4.10.9907031655240.9156-100000@server.duh.org>; from Todd Vierling on Sat, Jul 03, 1999 at 05:00:41PM -0400
References:  <Pine.GSO.4.10.9907031513150.17705-100000@rac9.wam.umd.edu> <Pine.NEB.4.10.9907031655240.9156-100000@server.duh.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990705114754.A23278>