Why do i need to add /g when using string replace in Javascript?
<p>Why is the '/g' required when using string replace in JavaScript?</p>

<p>e.g. <code>var myString = myString.replace(/%0D%0A/g,"&lt;br /&gt;");</code></p>
