Javascript examples for RegExp:RegExp Match
Find substring between angle brackets with custom regex match function
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/* w w w.j a va 2 s. c o m*/ var matches = []; 'abc <abc@gmail.com>, def <def@gmail.com>'.replace(/\<(.*?)\>/g, function(_, match){ matches.push(match); }); console.log(matches.join(',')); } </script> </head> <body> </body> </html>