I am trying to split a string into a list by a delimiter (let's say ,) but the delimiter character should be considered the delimiter only if it is not wrapped in a certain pattern, in my particular case <>.  IOW, when a comma is nested in <>, it is ignored as a delimiter and becomes just a regular character not to be delimited by.
So if I have the following string:
"first token, <second token part 1, second token part 2>, third token"
it should split into
list[0] = "first token"
list[1] = "second token part 1, second token part 2"
list[2] = "third token"
Needless to say, I cannot just do a simple split by , because that will split the second token into two tokens, second token part 1 and second token part 2, as they have a comma in between them.
How should I define the pattern to do it using Python RegEx?
 
     
    