Closed viniciusban closed 5 years ago
The matching is correct, but it's the highlighting of the match that is incorrect. This has been fixed in ack 3, which is currently in beta at https://github.com/beyondgrep/ack3.
I will probably not backport it to ack 2 because it would require a lot of rewriting how ack 2 works. I'm going to leave this ticket open as a reminder, however, in case we need to go back and fix it in ack 2 in the future.
I'm sorry, I misspoke. This bug is not going to change in ack 2. If anyone was relying on this behavior, I don't think it's good to make a change like this in a point release.
This is fixed in ack 3, and will not be addressed in ack 2.
1) Extended
grep
: CorrectResult: Housebreak or Housekeep
Conclusion: Correct: "House" followed by "break" or "keep".
2)
ack
with non-capturing groups: CorrectResult: Housebreak or Housekeep
Conclusion: correct, as extended
grep
above.3)
ack
with captured groups: FailResult: Housebreak or Housekeep
Conclusion: Fail. I don't want "break" or "keep" alone.
ack 2.22 on macOS 10.13.6 (High Sierra)