def meets_constraint(constraint_expr, data_path):
    """Parse the constraint expression and check if data_path meets the
    criteria.

    :param constraint_expr: (string) A DAP constraint string
    :param data_path: (string) Path of a DAP object within the dataset
    :returns: a boolean
    """
    if constraint_expr == '':
        return True

    constraint = constraint_expr.split(',')
    for constr in constraint:
        if constr.startswith(data_path):
            return True

    return False