[Bug 195763] bsdgrep, empty matches and -o

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Jan 22 20:21:04 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195763

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #179175|0                           |1
        is obsolete|                            |

--- Comment #6 from Kyle Evans <bsdports at kyle-evans.net> ---
Created attachment 179227
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=179227&action=edit
Proposed patch to address line matching issues

Address one last nit that I found in some more extensive testing -- if we're
going to replace the last match made (due to overlap), it should be an earlier
or strictly longer match than the current one.

Test case: echo "abcdef" | grep -o -e "ab" -e "bc"
Swap the order of -e arguments, "ab" and "bc" would previously yield different
results when they should both yield "ab".

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


More information about the freebsd-bugs mailing list