Extrair número de string

var num = txt.replace(/[^0-9]/g,'');
Disgusted Dogfish