Confusion in JavaScript RegExp ? Quantifier
- by Dusk
Hi,
May I know the reason of getting the output of the following code as: 1,10,10? Why not it is as: 10, 10?
<script type="text/javascript">
var str="1, 100 or 1000?";
var patt1=/10?/g;
document.write(str.match(patt1));
</script>