Type what you are looking for and where, tick the options, and get the grep command, plus the same search in ripgrep for large code trees.
Plain grep uses basic regular expressions, where + ? | ( ) are literal unless escaped, which surprises almost everyone. Use -E for the extended syntax most tools share. When you are searching for an exact string full of dots, brackets, or slashes, such as an IP address or a code snippet, use -F so nothing is treated as a pattern. -P gives Perl-compatible features like \d and lookarounds, but only in GNU grep. Always quote the pattern so the shell does not expand it first.
This grep builder assembles searches with the options you reach for every day: -r to search directories, -i for case-insensitive matches, -w for whole words, -v to invert, -n for line numbers, -l to list only file names, -c to count, -o to print just the match, and -A, -B, or -C for lines of context. It adds --include and --exclude-dir filters so you skip node_modules and .git, -I to ignore binary files, and quotes the pattern safely. It also shows the equivalent ripgrep (rg) command, which is much faster on large trees and respects .gitignore.
grep found the pattern in a file containing NUL bytes and will not print the line to avoid garbage in your terminal. Add -I to skip binary files entirely, or -a to treat them as text if you really want the output.
Both search recursively. -r skips symbolic links it finds inside directories, while -R follows them. -R can loop or wander into huge trees, so use -r unless you need links followed.
Put -e before it, as in grep -e '-v' file, or end the options with --. Otherwise grep reads the pattern as an option.
For searching code, usually. ripgrep is recursive by default, skips files ignored by .gitignore and hidden files, and runs searches in parallel. grep is installed everywhere, including minimal servers and containers, and its behaviour is standardised by POSIX, so it remains the right choice in scripts.