title: Can you grep a file using a regular expression and only output the matching part of a line?
body: <p>I have a log file which contains a number of error lines, such as:</p>
  
  <pre><code>Failed to add email@test.com to database
  </code></pre>
  
  <p>I can filter these lines with a single grep call:</p>
  
  <pre><code>grep -E 'Failed to add (.*) to database'
  </code></pre>
  
  <p>This works fine, but what I'd really like to do is have grep (or another Unix command I pass the output into) only output the email address part of the matched line.</p>
  
  <p>Is this possible?</p>