:-/ take a peek at java.util.regex?

edit:
Nevermind, follow Norm's advice and look at the Java String API