I'm trying to split a string on a , where that character is not contained in ().
Example String:
`table1`.`lname`,`table1`.`fname`,if(foo is not null,foo,if(bar is not null,bar,table3.baz)),`table3`.`shu`
I want to split it into an array looking like
(
0=>`table1`.`lname`
1=>`table1`.`fname`
2=>if(foo is not null,foo,if(bar is not null,bar,table3.baz))
3=>`table3`.`shu`
)
Any ideas on how to tackle this problem?
-- Dave