get only numbers regex code example
Example 1: get only numbers regex javascript
var numberPattern = /\d+/g;
'something102asdfkj1948948'.match( numberPattern )
Example 2: regex 10 numbers only
@"^\d{10}$"
var numberPattern = /\d+/g;
'something102asdfkj1948948'.match( numberPattern )
@"^\d{10}$"