title: Extract grep match with sed
body: <p>I'm trying to run the following:</p>
  
  <pre><code>echo $line | grep "u01/app/[0-9]" | sed -n 's/[0-9]|\./p'
  </code></pre>
  
  <p>Where </p>
  
  <pre><code>line="orb 14171 orb 3u REG 253,3 0 14141 /u01/app/11.2.0.4/broa/log/stm1025/agent/"
  </code></pre>
  
  <p>And what I would like to do is extract the version number, and store it in a variable, but whenever I run the above command, all I seem to get it sed: command garbled: <code>s/[0-9]p</code></p>
  
  <p>Anyone know what's wrong?</p>