title: Using javascript replace to replace numbers in a string?
body: <p>I have a string</p>
  
  <pre><code>var x='abcdefg1234abcdefg';
  </code></pre>
  
  <p>I want to replace <code>1234</code> with <code>555</code> using the <code>x.replace()</code> function like</p>
  
  <pre><code>x=x.replace(stuff here)
  </code></pre>
  
  <p>I tried to pass <code>'1234','555'</code> as the parameters but it's not working.</p>
  
  <p>Any clues? thanks</p>
  
  <p>Edit:
  The string is in a hidden <code>&lt;input&gt;</code> field. The value of it is:</p>
  
  <pre><code>&lt;object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="400" height="385"&gt;
   &lt;param name="movie" value="player.swf" /&gt; &lt;param name="allowfullscreen" value="true" /&gt;
   &lt;param name="allowscriptaccess" value="always" /&gt;
   &lt;param name="flashvars" value="provider=http&amp;file=files/videos/10.file" /&gt;
   &lt;embed type="application/x-shockwave-flash" src="player.swf" width="400" height="385" allowscriptaccess="always" allowfullscreen="true" flashvars="provider=http&amp;file=files/videos/10.file&amp;image=preview.jpg"/&gt;
  &lt;/object&gt;
  </code></pre>
  
  <p>I want to replace the width value and the height value to values stored in <code>sb_width</code> and <code>sb_height</code>.</p>