

Printable_ASCII_only_string = input_string.replace(/+/g, "") Since all the printable characters of ASCII are conveniently in one continuous range, we used the following to filter all other characters out of our string in JavaScript. Those characters are in the range ( in decimal) and they represent letters, digits, punctuation marks, and a few miscellaneous symbols.Ĭharacter 0x20 (or 32 in decimal) is the space character ' ' andĬharacter 0x7E (or 126 in decimal) is the tilde character '~'. 18 November 2017 in JavaScript tagged ascii / characters / delete / javascript / printable / regex / replace / string by TuxĪccording to the ASCII character encoding, there are 95 printable characters in total.
