import re
regex = re.compile(r"[A-Za-z\x{0600}-\x{06FF}\x{1000}-\x{1021}_-][-\w]*", flags=re.MULTILINE)
test_str = ("Abyssinian 987\n"
"Burmese a1a\n"
"Dragon Li 2B\n"
"987 Cat\n"
"cat 987 Toyger\n"
"cat A1A Siamese\n"
"1\n"
"abc-Burmese-a1a")
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