import re


def __extract_url_from_text(plain_text):
    """
    Extract the first occurence URL in a plain text
    """

    if plain_text:
        results = re.findall(r'(https?://[^\s]+)', plain_text)

        if results and len(results) > 0:
            return results[0]
        else:
            return ""
    else:
        return ""