HTML Editor
<!DOCTYPE html> <html lang="en-US"> <body> <p>Click the button to do a global search for a substring contains a sequence of three "e".</p> <button onclick="myFunction()">Click me</button> <p id="point"></p> <script> function myFunction() { // try str = "eeeeeeeeeeee"; var str = "I loveee developer"; var pattern = /e{3}/g; var result = str.match(pattern); document.getElementById("point").innerHTML = result; } </script> </body> </html>
OUTPUT
×

Save as Private