I would like to turn this:
mystr = '  foo1   (foo2 foo3 (foo4))' 
into:
['foo1','foo2 foo3 (foo4)']
So basically I have to split based on a number of spaces/tabs and parenthesis.
I have seen that re package split function can handle several delimiters (Python: Split string with multiple delimiters) but I can not manage to understand the right approach to parse this kind of strings.
Which would be the best -most pythonic- and simple approach?
 
     
     
     
    