The String class has some methods that would be useful: indexof, substring and split (with a regexp)