Python: POSIX character class in regex?
1 answer
Since POSIX is not supported by the Python module re
, you must emulate it using a character class.
You can use one of the regular-expressions.info and add a limit quantifier {10}
:
[\x20-\x7E]{10}
Watch the demo
Alternatively, you can use Matthew Barnett's regex module , which claims to support POSIX character classes (POSIX character classes are supported).
+4
source to share