javascript remove anything but numbers code example Example: javascript remove all but numbers string.replace(/[^0-9]/g, '');