I guess Regular Expressions can be the most powerful and most underappreciated tool if you dont know about it. I really recommend to spend some time reading about its powerful functionality. It is not easy to digest either, but in small servings of syntax and hands-on practice you have almost a golden hammer for dealing (searching, editing,manipulating) with strings and data.
Match any email address like email@example.com
There is a handy Netbeans plugin to play with your patterns and matches right in your favorite IDE.