def pop_first_namedgroup(groupdict, value):
    """Search a value in a groupdict and remove the first key found from the dict"""
    for k,v in groupdict.items():
        if v == value:
            groupdict.pop(k)
            return k, v, groupdict
    return False, value, groupdict