Regex Unicode
Python 3.8 required
examples/regex/print_unicode.py
print("\N{GREEK CAPITAL LETTER DELTA}") print("\u05E9") print("\u05DC") print("\u05D5") print("\u05DD") print("\u262E") print("\u1F426") # "bird" print("\u05E9\u05DC\u05D5\u05DD \u262E")
examples/regex/mixed.txt
Hello World! Szia Világ! !שלום עולם
examples/regex/match_unicode.py
import re filename = "mixed.txt" with open(filename) as fh: lines = fh.readlines() for line in lines: if re.search('\N{IN HEBREW}', line): print(line)