title: Print RegEx matches using SED in bash
body: <p>I have an XML file, the file is made up of one line.</p>
  
  <p>What I am trying to do is extract the "<code>finalNumber</code>" attribute value from the file via Putty. Rather than having to download a copy and search using notepad++.</p>
  
  <p>I've built up a regular expression that I've tested on an <a href="http://gskinner.com/RegExr/" rel="noreferrer">On-line Tool</a>, and tried using it within a <code>sed</code> command to <a href="http://www.grymoire.com/Unix/Sed.html#uh-15b" rel="noreferrer">duplicate grep functionality</a>. The command runs but doesn't return anything. </p>
  
  <p>RegEx:</p>
  
  <pre><code>(?&lt;=finalNumber=")(.*?)(?=")
  </code></pre>
  
  <p><code>sed</code> Command (returns nothing, expected 28, see file extract):</p>
  
  <pre><code>sed -n '/(?&lt;=finalNumber=")(.*?)(?=")/p' file.xml
  </code></pre>
  
  <p>File Extract:</p>
  
  <pre><code>...argo:finalizedDate="2012-02-09T00:00:00.000Z" argo:finalNumber="28" argo:revenueMonth=""...
  </code></pre>
  
  <p>I feel like I am close (i could be wrong), am I on the right lines or is there better way to achieve the output?</p>