import re
regex = re.compile(r"^.*?\p{Han}.*\n", flags=re.MULTILINE | re.UNICODE)
test_str = ("A.我不要这些汉字\n"
"Ok I see\n"
"有人会懂我写的吗?\n"
"Why not then?\n"
"我看够呛。\n"
"This is just an example")
subst = ""
result = regex.sub(subst, test_str)
if result:
print(result)
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Python, please visit: https://docs.python.org/3/library/re.html