p = re.compile(
    "((?:(?!\\band\\b)[^\\'])*(?:\\'[^\\'\\\\]*(?:\\\\.[^\\'\\\\]*)*\\'(?:(?!\\band\\b)[^\\'])*)*)(?:and|$)"
    )
s = (
    """section_category_name = 'computer and equipment expense' and date >= 2015-01-01 and date <= 2015-03-31"""
    )
print([x for x in p.findall(s) if x])
How to split a string by a string except when the string is in quotes in python?