JavaScript Replace anything but numbers from a string

var s = "+1 (444) 7444";

s.replace(/[^0-9.]/g, "");

14447444


Mostly useful for formating phone numbers. There are better JS frame works to format a number based on country code as well, but this seems the lightest.