import re


def _parse_unsubscribe_infos(infos):
    """
    parse the unsubscription info given in the URL
    to return the username, user email, and unsubscription token 
    """
    pattern = '(?P<user>.*?)-(?P<email>.*?)-(?P<token>.*)$'
    match = re.search(pattern, infos, re.DOTALL)
    if match:
        return (match.group('user'), 
                match.group('email'),
                match.group('token')
                )
    return (None, None, None)