A
aliensite
My code is too greedy, how can it be fixed?
Here is my code:
Desired output - First:,Second:,Third:
<br>
<script type="text/javascript">
var regEx = /[^<>]*?:/g;
var html = "<br>First:ratio<br />Second: 2:3<br>Third: size";
var output = html.match(regEx);
document.write(output);
</script>
Thanks for your help.
Dave
Here is my code:
Desired output - First:,Second:,Third:
<br>
<script type="text/javascript">
var regEx = /[^<>]*?:/g;
var html = "<br>First:ratio<br />Second: 2:3<br>Third: size";
var output = html.match(regEx);
document.write(output);
</script>
Thanks for your help.
Dave