'Returns platform instance if user_agent matches with USER_AGENT_REGEX
Arguments:
user_agent (str): user-agent for mobile app making the request.
user_agent_regex (regex str): Regex for user-agent valid for any type pf mobile platform.
Returns:
An instance of class passed (which would be one of the supported mobile platform
classes i.e. PLATFORM_CLASSES) if user_agent matches regex of that class else returns None'

@classmethod
def get_user_app_platform(cls, user_agent, user_agent_regex):

    match = re.search(user_agent_regex, user_agent)
    if match:
        return cls(match.group('version'))
