import re


def re_search(t_compiled, t_in, t_print_true="", t_print_false=""):
    """Function will search provided string using provided regex rule, depending on the results it'll return True or False and optionally perform one print for each."""
    if re.search(t_compiled, t_in):
        if t_print_true != "":
            print(t_print_true)
        return True
    else:
        if t_print_false != "":
            print(t_print_false)
        return False