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
209 B
Python
Raw Normal View History

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