<!DOCTYPE html>
<html lang="en-US">
<body>
<p>Click the button to do a global search for any of the specified alternatives (1|2|3|5|7|9).</p>
<button onclick="myFunction()">Click me</button>
<p id="point"></p>
<script>
function myFunction(){
var str = "0123456789";
var pattern = /(1|3|5|7|9)/g;
var result = str.match(pattern);
document.getElementById("point").innerHTML = result;
}
</script> </body>
</html>