Regular Expression to replace all characters except …

link.replace(/[^0-9]/g,'')

Leave a Reply