import re


def get_date(text):
    """Method to extract the date from right before a colon in a string surrounded by quotes"""
    match = re.search(r"\[(.+?)\]", text)
    if match:
        match_string = match.group()
    else:
        match_string = ""
    # print("{}".format(match_string))
    # match should now be a combination of the date and time, we just want the date portion...
    date_string = match_string.split(":", 1)[0]
    return date_string.strip(r"\[")