Javascript examples for RegExp:RegExp Match
Match string with regex
<html> <head> <meta name="viewport" content="width=device-width"> </head> <body> <script> const value = '<ns2:NewsPaper unitid="112234">'; const regex = /(unitid="[^"]+?")/; const matches = value.match(regex);/* www. ja v a 2 s . co m*/ console.log(matches); </script> </body> </html>