How do I write a regular expression that includes all keyboard characters except \'~\' and \',\'?
You didn't say what language/tool you're using, but in Java I would go with this regex:
"[\\p{Print}&&[^~,]]"
That's the intersection of two sets: all printing ASCII characters, and all characters that aren't a tilde or a comma.