Ruby/reader/filter.py
2025-04-24 13:38:55 -04:00

13 lines
267 B
Python
Raw Blame History

import re
def is_valid_line(text: str) -> bool:
text = text.strip()
if len(text) < 10:
return False
if not re.search(r"[a-zA-Z]", text):
return False
if any(c in text for c in ["<EFBFBD>", "\ufffd"]):
return False
return True