<!DOCTYPE html>
<html>
<body>

<p>Click the button to do a global search for a "1", followed by zero or more "0" characters.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
    var str = "1, 100 or 1000?";
    var patt1 = /10*/g;
    var result = str.match(patt1);
    document.getElementById("demo").innerHTML = result;
}
</script>

</body>
</html>