top | item 17883095

(no title)

sstanfie | 7 years ago

Because ripgrep is the reason I discovered Rust (along with xsv for CSV manipulation) and because Andrew asked:

% grep "die()" * [...results with functions named die()...]

% rg "die()" Error parsing regex

I reach for grep when I need to do non-regex searching. Can't remember how to do an fgrep fixed-pattern style ripgrep.

great tools andrew: I use them every day and install them first thing on a new box. know that your code really helps

discuss

order

burntsushi|7 years ago

Ah yes! That is a good one too. That's because grep uses "basic" regexes by default, and this sort of use case is one area where they work nicely. The downside is needing to remember which meta characters need to be escaped.

For ripgrep, you can enable literal search the same way you do it in grep: with the -F flag.

Thanks for responding!