js regex extract number from string code example
Example 1: get only numbers regex javascript
var numberPattern = /\d+/g;
'something102asdfkj1948948'.match( numberPattern )
Example 2: js get number from string
thenum = "foo3bar5".match(/\d+/)[0] // "3"