title: How to terminal output command pipe to input of grep and using regular expression?
body: <p>I thought getting an IP address on OSX or Linux would be rather easy to learn how to use regular expression with grep, but it looks like I either have a syntax error or misunderstanding of what is required.</p>
  
  <p>I know this regex is correct, although I know it may not be a valid IP address I'm not considering that at this point.</p>
  
  <pre><code>(\d{1,3}\.){3}\d{1,3}
  </code></pre>
  
  <p>so I'm not sure why this doesn't work.</p>
  
  <pre><code>ifconfig | grep -e "(\d{1,3}\.){3}\d{1,3}"
  </code></pre>