If you don't mind giving up the part of the old java that underlies CF ... The AColdFusion string is actually a java string. Java splitting uses a regular expression, which is most easily the only string you want to split. Thus, unlike listToArray (which was expanded in cf9 to allow multi-character splits, by the way), it is by definition multi-character. And since this is a regular expression, if you want it to be case insensitive, this can also be easily done.
So your line:
<cfset variables.myString = "The big brown fox jumped<br> over the fence." /> <cfset variables.myStringArray = variables.myString.split("(<[bB][Rr]>)",2) /> <cfset variables.myString = variables.myStringArray[1] />
variables.myStringArray will contain an array with no more than two elements, part before the first <br>, and part after the first <br> (the second parameter to split, 2, says that it is divided into 2 parts, at most), which will leave any value of <br> in the second part of your line is untouched.
source share