Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Apr 2017 15:07:20 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 95936] egrep(1) misparses multiline parenthetical grouping
Message-ID:  <bug-95936-8-kuSvtfg94S@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-95936-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-95936-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D95936

Kyle Evans <bsdports@kyle-evans.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bsdports@kyle-evans.net

--- Comment #1 from Kyle Evans <bsdports@kyle-evans.net> ---
Hi (delayed response),

This is actually intended behavior. It's not so much that it doesn't correc=
tly
see it, it's that newlines are pattern delimiters, so this is actually brok=
en
into two different patterns: '(', and 'hi)'. To verify, check:

$ printf "hi\nthere" | egrep -o "hi
er"
hi
er
# Correct

This is probably dual purpose:

1. Maintains consistency with file-read patterns (-f)
2. grep is inherently line-oriented, thus making it nonsensical to actually
match on newlines.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-95936-8-kuSvtfg94S>