JavaScript string replace. How to check if there was a match?
<p>Is there any other way to find out if were was a match in String.replace method then searching in it's result?
Or there is another method which give me that informations?
I need behavior similar to PHP's preg_replace, where i can add optional argument which will be filled with the number of replacements done.</p>
