Match non printable/non ascii characters and remove from text
To target characters that are not part of the printable basic ASCII range, you can use this simple regex: [^ -~]+ Explanation: in the first 128 characters of the ASCII table, the printable range starts with the space character and ends with a tilde. These are the characters you want to keep. That range is … Read more