jQuery extract numbers from string
Share
Quick jQuery code snippet to extract numbers from string using a replace regex method.
function getId(str)
{
return str.replace(/[^d.,]+/,'');
}
Quick jQuery code snippet to extract numbers from string using a replace regex method.
function getId(str)
{
return str.replace(/[^d.,]+/,'');
}