I am new to regex and trying to split on the basis of (and/or) as delimiters
I used the solution provided in : https://stackoverflow.com/a/18893443/5164936
and modified my regex as :
re.split(r'(\s+and\s+|\s+or\s+)(?=(?:[^"]*"[^"]*")*[^"]*$)', s)
which works like a charm for majority of my use cases except for following input:
'col1 == "val1" or col2 == \'val1 and " val2\''
the split fails for this particular case and I have tried modifying the above regex with different combination with no luck. Can someone please help fix this regex.