Prev Demo
JavaScript
>
(X|Y) Expression
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> </head> <body> <p>Click the below button to find any specified between the brackets.</p> <input type="button" value="Click" onclick="mySearch()" /> <p id="myId"></p> <script> function mySearch() { var A = "Tec, TechFunda, ITFunda, TechFunda, ITFun, NetFun, TechFunda, ITFunda, DotNet"; var B = /(TechFunda|ITFunda)/g; var R = A.match(B); document.getElementById("myId").innerHTML = R; } </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output