I was trying to match all the string that contain one word in any language. My search led me to \\p{...} which was absent in python\'s Re module. But I found https://pypi.py
You should pass unicode. (Both regular expression and the string)
import sys
import regex
def main(patterns):
patterns = [regex.compile(p) for p in patterns]
for line in sys.stdin:
line = line.decode('utf8')
for regexp in patterns:
if regexp.search (line):
print line.strip('\n')
if __name__ == '__main__':
main([ur'^\d+\t(\p{L}|\p{M})+$', ])