Split a document using delimiters?

It wasn’t really solved as this short script above only supports plain text.

Meanwhile there’s a script that splits RTF(D).