mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
9 lines
209 B
Python
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
|