Split a string into substrings with given delimiters. 