HTML Editor
<!DOCTYPE html> <html lang="en-US"> <body> <p>Click the button to do a case-insensitive search for "Great" in a string.</p> <button onclick="myFunction()">Click Me</button> <p id="point"></p> <script> function myFunction() { var str = "Do it great or nothing"; var pattern = /Great/i; var result = str.match(pattern); document.getElementById("point").innerHTML = result; } </script> </body> </html>
OUTPUT
×

Save as Private