For efficiency of the search, you can represent your substrings using a trie data structure (
http://en.wikipedia.org/wiki/Trie[
^]).
Then repeatedly perform a search for the longest string that matches some substring. Anyway, this is not a bulletproof solution, as long substring matches could supersede shorter substring matches and lead to a dead end.
Example: looking for { "ab", "abc", "ce" } in "abce" would detect "abc" and then fail on "e", whereas there is a solution with "ab" followed by "ce".