1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00
royalnet/keipack/utils/anyinstring.py
2019-12-13 02:48:16 +01:00

9 lines
209 B
Python

from typing import *
import re
def any_in_string(patterns: Collection[str], string: str) -> bool:
for pattern in patterns:
if re.search(pattern, string):
return True
return False