Find multiple values between two character in a string using regex - Javascript RegExp

Javascript examples for RegExp:RegExp Match

Description

Find multiple values between two character in a string using regex

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 w w  w  .j av a  2s .com
var str = '(value one is: 100), (value two is:200)';
var regex = /\d+/g;
var numbers = str.match(regex);
console.log(numbers);
    }

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

Related Tutorials