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