Do not include string in match - Javascript RegExp

Javascript examples for RegExp:RegExp Match

Description

Do not include string in match

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
    window.onload=( function() {/*from   www.  j a v a2s.  com*/
var string = 'The value is ij35test. The value is test53testtest.';
var re = new RegExp(/The value is (.*?)\./g)
var strs = []
var m = re.exec(string)
while(m != null) {
  strs.push(m[1]);
  m = re.exec(string)
}
console.log(strs)
    });

      </script> 
   </head> 
   <body>  
   </body>
</html>

Related Tutorials