title: Javascript Regular Expression for rgb values
body: <p>I'm trying to get the individual values of a rgb string. I've been getting close, but I'm just   hitting a wall. I'm looking to do something like this:</p>
  
  <pre><code>var color = rgb(255, 85, 120);
  
  /// My Regex ///
  var rRegex = /^rgb\(\d{3}/;  // Which actually gives me an array of two strings...ugh
  var gRegex = ;
  var bRegex = ;
  
  var r = color.match(rRegex);
  var g = color.match(gRegex);
  var b = color.match(bRegex);
  </code></pre>
  
  <p>I'm just looking to have: </p>
  
  <pre><code>/// // I think I can pull these off by Starts With and Ends With anchors... ///
  r = 'From "(" to "," ';
  g = 'From "," to "," ';
  b = 'From "," to ")" ';
  </code></pre>
  
  <p>I'm trying to make also make it so that the regex can take either 1, 2, or 3 numbers, as the values go from 0 - 255. Thanks for any help!</p>