A follow up on question Python Regex - replace a string not located between two specific words as the answers were incomplete.
Given a string str, split according to "::", while disregarding "::" that are between "<" and ">" brackets.
Expected inputs and outputs:
input a :: <<a :: b> c>::<a < a < b:: b> :: b> :: b> :: a
output [a , <<a :: b> c>,<a < a < b:: b> :: b> :: b> , a]
input a< b <c a>>
output [a< b <c a>>]
input a:<a b>
output [a:<a b>]