I have a string like this in python
filter="eq(Firstname,test),eq(Lastname,ltest),OR(eq(ContactID,12345),eq(ContactID,123456))"
rx_comma = re.compile(r"(?:[^,(]|\([^)]*\))+")
result = rx_comma.findall(filter)
Actual result is:
['eq(Firstname,test)', 'eq(Lastname,ltest)', 'OR(eq(ContactID,12345)', 'eq(ContactID,123456))']
Expected result is:
['eq(Firstname,test)', 'eq(Lastname,ltest)', 'OR(eq(ContactID,12345),eq(ContactID,123456))']
Any help is appreciated.