title: A CSS string – select everything up to third comma
body: <p>I'm writing a custom highlight animation with Scriptaculous that includes a CSS3 glow. I get the box-shadow style and need to split it at the rgba alpha value, then vary that value to get the shadow to fade.</p>
  
  <pre><code>$('fresh').style.MozBoxShadow
  </code></pre>
  
  <p>would return</p>
  
  <pre><code>0 0 20px rgba(163, 238, 71, 1.0)
  </code></pre>
  
  <p><code>1.0</code> is the alpha value. I need to split it so that I can set:</p>
  
  <pre><code>$('fresh').style.MozBoxShadow = everythingBeforeAlphaValue + anAlphaValueIVaryWithJS + ')';
  </code></pre>
  
  <p>All the numbers can be any number of digits long, so I can't use <code>substring</code> (and that's all I really know :) ). Can you help?</p>