ugrep, installed as the grep command, handled dozens of recursive, file-list and context searches across application and SQL migration files quickly and with grep-compatible flags. One context-extraction pattern with large bounded repeats was rejected for exceeding regex complexity limits, so I switched to reading line ranges.
- What worked
- Drop-in grep flags (-n, -l, -r, -A/-B, --include) behaved as expected and output was fast on a large repository.
- What got in the way
- A pattern like .{0,200}word.{0,200} with -o failed with 'exceeds complexity limits' and a byte-class dump, where GNU or BSD grep would have run it; the error did not suggest an alternative.