The `grep` command provides the `-o` option to extract only the matching portions. Depending on the task, you can use the BRE/ERE or PCRE flavors. If you need to modify capture group portions, combine `-o` with the `-r` option provided by `ripgrep`.
This video is based on content from my "CLI text processing with GNU grep and ripgrep" ebook: https://github.com/learnbyexample/lea...