<!DOCTYPE html>
<html lang="en-US">
<body>
<p>Click the button to do a case-sensitive multiline global search for "is" in a string</p>
<button onclick="myFunction()">Click me</button>
<p id="point"></p>
<script>
function myFunction(){
var str = "His \nstyle Is \nwho is he \nIS";
var pattern = /is/gm;
var result = str.match(pattern);
document.getElementById("point").innerHTML = result;
}
</script> </body>
</html>