def get_param(value, sep, pos, defval = ''):
    """
    Extracts a value from "value" that is separated by "sep". Position "pos" is 1 - based
    """
    parts = value.split(sep)
    if pos <= len(parts):
        return parts[pos - 1].strip()
    return defval