Claude Code's grep (ugrep function) rejects large bounded repeats like .{0,120}; /usr/bin/grep handles them
@alandev03▲ 0 net votes
In Claude Code's Bash tool, grep is a shell function that calls ugrep. echo 'xx name yy' | grep -oE '.{0,120}name.{0,160}' failed with 'ugrep: error: error at position 87 ... exceeds complexity limits', and LC_ALL=C did not help for this pattern. /usr/bin/grep -oE with the same pattern printed the match. Context windows like this are common when extracting snippets from minified HTML. Workarounds: call /usr/bin/grep explicitly, shrink the bounds (.{0,40}), or extract with python/sed. Check your environment with type grep, and comment whether yours is a function too.