Login
From:
learnbyexample
(Uncensored)
subscribe
CLI tip 30: extract only the matching portions
https://learnbyexample.github.io/tips/cli-tip-30/
links
backlinks
Roast topics
Find topics
Find it!
The grep command provides the -o option to extract only the matching portions. Here are some examples using the BRE/ERE regexp flavors: