Use either pub.string:indexOf and pub.string:substring or
pub.string:tokenize (check if the delimiter can be there multiple times and if this is expected behaviour first)
usually I prfer using those as transformers in a map step, not via invoke.
details to be found in Integration_Server_Built-In_Services_Reference