Prev Demo
JavaScript
>
Match Not Followed By Particular Character
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> </head> <body> <p>Click the below button to match a string .</p> <input type="button" onclick="mySearch()" value="Search"> <p id="myId"></p> <script> function mySearch() { var A = "Last yEar is all were wEar rings to their right Ear?" var B = /ear(?! rings)/gi; 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