Image Study the \d, \s, \w, and. metacharacters

Image regex provides for quantifiers which allow you to specify concepts like: "look for one or more digits in a row."

Image Study the ?, *, and + greedy quantifiers.

Image Remember that metacharacters and Strings don't mix well unless you remember to "escape" them properly. For instance String s = "\\d";

The Pattern and ...

Get SCJP Sun Certified Programmer for Java 6 Study Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.