Generally if doing this (or assisting others) I first process the $Text to replace any semi-colon with a string such as ‘####’. The string wants to be (a) something unlikely to occur is the actual text and (b) does not use regex special characters: i.e. backslash, caret, dollar sign, the full stop, vertical bar (‘pipe’), question mark, asterisk, plus sign, opening or closing parenthesis, opening square bracket and the opening curly brace.
As you relate, you took this path but initially failed to allow for regex special characters.
I don’t think there is a simpler form. Tinderbox lists (Set, List types) are strings containing semicolon-delimited values. There is no method to escape a literal semi-colon in a string - as opposed to a value delimiter. I can give $MyList a value ‘ant;bee;cow’ which is treated as two list items as the first semi-colon is treated as a literal character and not a value delimiter. But If I set $MyString to the value of $MyList , the resulting string is ‘ant;bee;cow’ - now with a literal backslash, at least from the user’s perspective.
Unless/until the String.split()
operator deals with literal semi-colons internationally (i.e. escaping them within the function then unescaping the output) I think it will remain necessary to escape in-$Text semi-colons deliberately before trying to split out paragraphs.