JavaScript - - By Sam Deering

jQuery extract numbers from string

Quick jQuery code snippet to extract numbers from string using a replace regex method.

function getId(str)
{
    return str.replace(/[^d.,]+/,'');
}
Sponsors