It's a type of Planche
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 line
321B

  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import logging
  4. import re
  5. logger = logging.getLogger(__name__)
  6. ascii_characters = [chr(i) for i in range(32, 127)]
  7. ascii_char_rgx = re.compile("{}".format(re.escape(ascii_characters)))
  8. def ascii_only(incoming_string):
  9. return control_char_rgx.sub("", incoming_string)