Re: grep and Regular expression correctness

From: Bob Bishop <rb_at_gid.co.uk>
Date: Mon, 23 Aug 2010 13:45:26 +0100
Hi,

On 23 Aug 2010, at 12:51, chrisk-freebsd_at_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_at_gid.co.uk
Received on Mon Aug 23 2010 - 10:45:43 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:06 UTC