how to remove special characters from a numberin javascript code example Example: js remove special characters var desired = stringToReplace.replace(/[^\w\s]/gi, '')