I'm basically working on custom query building. I've designed the pattern as field_set and sub_field_sets. A sample Query:
({e:3}.{f:44}.{f:2}) + (
({e:3}.{f:44}.{f:3}) + ({e:3}.{f:44}.{f:4})
) - ({e:3}.{f:44}.{f:5})
I want to get all operators from root using REGEX. Which in this case should result ['+', '-'] and NOT ['+', '+', '-']
This works on given sample: