string manipulation
<p><a href="http://stackoverflow.com/questions/2243688/javascript-text-manipulation/2244002#2244002">http://stackoverflow.com/questions/2243688/javascript-text-manipulation/2244002#2244002</a></p>

<p>I need to make little manipulation in the string.I need to retrieve the matched text and then replace the matched text.Something like this</p>

<p>Replace("@anytext@",@anytext@)</p>

<p>My string can have @anytext@ any where in string multiple times.</p>
