<filename>utils/search.py
import re

def get_regex_matches(full_string, regex):
    p = re.compile(regex)

    return p.findall(full_string)

def split_string_by_regex(string, regex):
    p = re.compile(regex)

    return p.split(string)

def is_known_part_in_text(known_part, string):
    match = get_regex_matches(string, known_part)

    return len(match) > 0