Hi, community!
Consider you need to exclude substring(s) from a string.
I did it with the following snippet:
/// excludes all the substrings from the string
ClassMethod ExcludeSubstring(substr,str as %String) As %String
{
while ($L(str,substr)>1) {
set str=$Piece(str,substr)_$Piece(str,substr,2,*)
}
quit str
}
So, for example: