Javascript examples for RegExp:Bracket
Do a global, case-insensitive search for "is":
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {/*from w ww .ja v a 2s .c o m*/ var str = "The following code shows how to Is this all there is?"; var patt1 = /is/gi; var result = str.match(patt1); document.getElementById("demo").innerHTML = result; } </script> </body> </html>