import re


def get_browser(user_agent):
    """Get Browser Name from User Agent"""

    match = re.search(r'(?i)(firefox|msie|chrome|safari|trident)', user_agent, re.IGNORECASE)
    if match:
        browser = match.group(1)
    else:
        browser = None
    return browser