Date: Mon, 23 Aug 2010 13:45:26 +0100 From: Bob Bishop <rb@gid.co.uk> To: chrisk-freebsd@list.mightyreason.com Cc: freebsd-current@freebsd.org, gabor@freebsd.org Subject: Re: grep and Regular expression correctness Message-ID: <1179D92F-9AB7-43A4-8943-7DA58F5E234D@gid.co.uk> In-Reply-To: <4C7260CC.9070407@list.mightyreason.com> References: <4C7260CC.9070407@list.mightyreason.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, On 23 Aug 2010, at 12:51, chrisk-freebsd@list.mightyreason.com wrote: > [...]The hardest part of POSIX regular expressions is in picking out the > correct captured subexpressions. This makes programs like "sed" > vulnerable to the bad regex.h engine that comes with the operating system. > > Luckily grep does not need the captured subexpressions, and thus does > not need the complexity that comes from the ideas behind TRE. [etc] I think grep does potentially need the captured subexpressions, for eg: \([abc]\)99\1 matching eg b99b -- Bob Bishop rb@gid.co.uk
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1179D92F-9AB7-43A4-8943-7DA58F5E234D>