Javascript examples for RegExp:RegExp Match
Use Regex to match message
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){//from w w w.j av a 2 s .co m var regex = new RegExp('(Message.*?TFTP service is down.|Message: device name is unreachable)'); console.log(regex.test('Message: \\SERVERNAME: TFTP service is down.')); } </script> </head> <body> </body> </html>