splitLeavingParenthesisContents

Split a String into multiple parts by using one or more delimiter characters. Any delimiters that are surrounded by matching opening and closing brackets are skipped. E.g. "a,(b,c)" will result in a list containing "a" and "(b,c)" when splitting on commas. Empty parts are ignored, so when splitting "a,,,,(b,c)", the same result is returned as in the previous example.

Return

A list of all parts of the input, as divided by any delimiter

Parameters

toSplit

The input String

delimiters

A String containing all characters that should be treated as delimiters