Is there a `grep`-like utility to match strings instead of lines?

Solution 1:

You can supply grep the -o option. Like such:

grep -o pattern file

(Hint: The mnemonic I use for this is: omit everything except match)