I'm working on a simple wiki engine, and I am wondering if there is an efficient way to split a string into a list based on a separator, but only if that separator is not enclosed with double square brackets or double curly brackets.
So, a string like this:
"|Row 1|[[link|text]]|{{img|altText}}|"
Would get converted to a list like this:
['Row 1', '[[link|text]]', '{{img|altText}}']
EDIT: Removed the spaces from the example string, since they were causing confusion.