title: Flash AS3 extract numbers from String (regexp?)
body: <p>I am sending a var to Flash:</p>
  
  <pre><code>// incoming
  var pageColor:String = "rgb(81, 89, 112)";
  </code></pre>
  
  <p>I have this function to covert the RGB values to a HEX</p>
  
  <pre><code>function rgb2hex(r:Number, g:Number, b:Number) {
      return '0x'+(r &lt;&lt; 16 | g &lt;&lt; 8 | b).toString(16).toUpperCase();
  }
  // trace(rgb2hex(81, 89, 112));
  </code></pre>
  
  <p>Now I am looking for the best way to extract the numbers from the <code>pageColor</code> string and use them in the <code>rgb2hex</code> function..</p>