1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-24 03:54:20 +00:00
royalnet/keipack/utils/anyinstring.py

10 lines
203 B
Python
Raw Normal View History

2019-12-12 23:02:49 +00:00
from typing import *
import re
def any_in_string(patterns: List[str], string: str) -> bool:
for pattern in patterns:
if re.search(pattern, string):
return True
return False