how to extract the matched pattern in grep code example Example: grep extract only matched string grep -E -o "insert regex here"