You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rejects a leading quantifier (?/*/+) that GNU accepts with a warning #23
A repetition operator (?, *, +) at the start of an expression has no preceding atom to repeat. GNU grep treats this leniently: it prints warning: <op> at start of expression to stderr, matches as if the operator were a no-op (so every line is selected), and exits 0. uu_grep rejects the pattern as a hard error and exits 2.
Found by the differential fuzzer (fuzz_grep).
Rust (incorrect)
$ printf'abc\n'| ./target/release/grep -e '?' -E
# Output (stderr): grep: invalid pattern "?": Oniguruma error: target of repeat operator is not specified# Exit code: 2
The same divergence occurs for * and + as the leading character (grep -E '*', grep -E '+'): GNU warns and matches every line (exit 0); uu_grep errors (exit 2).
Activity
sylvestre commentedon Jun 4, 2026
The interval form
{2}triggers the same thing — GNU warns{...} at start of expressionand matches every line,uu_greperrors: