From 2d9f40667197ac775d5215ffd164c800f83cab4c Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 12:35:40 -0300 Subject: A pattern with a newline and an anchor mvzr would misread is refused EINVAL, as the doc says Its words named no malformed input, so 9ns read the refusal as EIO, and Edit's failed EIO directly. It now says bad regular expression: ..., and Edit's failure with those words is EINVAL too. Co-Authored-By: Claude Opus 5.5 --- src/regexp.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/regexp.zig') diff --git a/src/regexp.zig b/src/regexp.zig index 64e1d75a..27b3c0ba 100644 --- a/src/regexp.zig +++ b/src/regexp.zig @@ -41,7 +41,7 @@ pub const Regex = struct { /// patterns take 45-80 ms, and a Debug build is ten times slower. pub const budget: u64 = if (builtin.mode == .Debug) 4_000_000 else 32_000_000; - pub const e_anchor = "in a pattern with \\n, ^ can only come first and $ only just before a \\n"; + pub const e_anchor = "bad regular expression: in a pattern with \\n, ^ can only come first and $ only just before a \\n"; /// `Anchor`: a pattern that names a newline has `^` other than first, /// or `$` other than just before a `\n`, which mvzr would read as the -- cgit v1.3