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