Prev Demo
Search String By Using Case-Insensitive Search In Javascript.
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> </head> <body> <h1>Performing case-insensitive search in a string.</h1> <p>Click the below button for the case-insensitive search.</p> <input type="button" value="Search" onclick="Function()" /> <p id="myId"></p> <script> function Function() { var a = "The website dotnefunda or DOTNETFUNDA or DotNetFunda, all are same."; var r = a.search(/DotNetFunda/i); document.getElementById("myId").innerHTML = r; } </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output