Some further suggested refinements to account for the need to parse out text where the first and last required parsed items are not bound by a left side or right side tag:
posL = Case(not IsEmpty(leftSideTag);Position(text; leftSideTag; 1; occurrence);1);
posR = Case(not IsEmpty(rightSideTag); Position(text; rightSideTag; posL + 1; 1);Length(text)+1);
leftStart = posL + Length(leftSideTag)
If(posL > 0 and posR > posL;
Middle(text; leftStart; posR - leftStart);
For example in the previous CF, for a string of comma delimited values, the first value could not be parsed unless leftSideTag was a comma, and the last value could not be parsed unless the last character was a comma.
In the above suggestion, if the leftSideTag is empty (""), the PosL will return 1, and if the rightSideTag is empty (""), PosL will return the length of the text +1, which will be the end of the line. Comma separated text such as A,B,C,D,E can now be parsed when the CF parameters are appropriately set.
ah, excellent point. Like many parsing routines, one often needs to bookend the text-in-question with something. I use this in a list-parsing function, below. Instead of commas, I needed line-feeds (¶)