Questions tagged «non-printable»

13
从python中的字符串中剥离不可打印的字符
我过去跑步 $s =~ s/[^[:print:]]//g; 在Perl上摆脱不可打印的字符。 在Python中,没有POSIX正则表达式类,并且我不能写[:print:]来表示我想要的意思。我不知道在Python中无法检测字符是否可打印。 你会怎么做? 编辑:它也必须支持Unicode字符。string.printable方式会很乐意将它们从输出中剥离。curses.ascii.isprint将为任何unicode字符返回false。
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.