Skip to content

grep: honor GNU buffer anchors in BRE#38

Closed
wondr-wclabs wants to merge 1 commit into
uutils:mainfrom
wondr-wclabs:codex/bre-buffer-anchors
Closed

grep: honor GNU buffer anchors in BRE#38
wondr-wclabs wants to merge 1 commit into
uutils:mainfrom
wondr-wclabs:codex/bre-buffer-anchors

Conversation

@wondr-wclabs
Copy link
Copy Markdown
Contributor

Fixes #33.

This enables Oniguruma's GNU buffer-anchor syntax for BRE mode so escaped backtick and escaped apostrophe are parsed as start/end anchors instead of literal characters. The change is limited to BRE because the reported mismatch is in default grep mode, and the operator is the specific Onig flag for these GNU anchor spellings.

Regression coverage adds default-mode cases for both anchors, including non-matches where the same characters appear away from the line boundary.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Jun 5, 2026

Merging this PR will not alter performance

✅ 10 untouched benchmarks
⏩ 17 skipped benchmarks1


Comparing wondr-wclabs:codex/bre-buffer-anchors (101996d) with main (f4798cb)

Open in CodSpeed

Footnotes

  1. 17 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@wondr-wclabs
Copy link
Copy Markdown
Contributor Author

Closing this older duplicate in favor of #56. The replacement PR enables the same GNU buffer-anchor operator, but covers both BRE and ERE because the repro also fails under -E; #38 only covered the default BRE path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GNU start/end-of-buffer anchors are treated as literals instead of anchors

1 participant