Thanks for this bug report and patch. Paolo wrote it up in
<http://bugs.gnu.org/17156#14>, and I installed it into the savannah
grep master and am marking Bug#17025 as done.
- bug#17025: [PATCH] grep: matching line-by-line with regex Norihiro Tanaka
- bug#17025: [PATCH] grep: matching line-by-line with r... Paolo Bonzini
- bug#17025: [PATCH] grep: matching line-by-line with r... Paul Eggert
