title: How to replace matches pattern with html tag?
body: <p><strong>I have some html code following</strong></p>
  
  <pre><code>&lt;span style="color:#c5c5c5;"&gt;
   This is sample text &lt;/span&gt; with ^(upper) text 
   and some ^(trademark) ^(copyright) symbols !
  </code></pre>
  
  <p>Now i'm using javascript to replace all string start with ^( and end with )</p>
  
  <p><strong>this is result i want</strong></p>
  
  <pre><code>&lt;span style="color:#c5c5c5;"&gt;This is sample text &lt;/span&gt; with &lt;sup&gt;upper&lt;/sup&gt; text and some &lt;sup&gt;trademark&lt;/sup&gt; &lt;sup&gt;copyright&lt;/sup&gt; symbols !
  </code></pre>
  
  <p>I'm using function and regex, to replace all string that match a patterm</p>
  
  <p><strong>Javascript Here !</strong></p>
  
  <pre><code>var pattern = /\^\(.*\)/;
  </code></pre>
  
  <p>But i don't know how to using while() to replace all i want  :-s</p>