HTML Editor
<!DOCTYPE html> <html lang="en-US"> <body> <p>Click the button to do a case-sensitive search for the character "s" in a string.</p> <button onclick="myFunction()">Click me</button> <p id="point"></p> <script> function myFunction(){ var str = "His style Is who is he IS"; var pattern = /[s]/g; var result = str.match(pattern); document.getElementById("point").innerHTML = result; } </script> </body> </html>
OUTPUT
×

Save as Private