Regular Expressions are used for matching strings against a particular pattern. They enable a generalised set of possible strings to be defined and then for specific strings to be tested to see whether they fit the pattern. For example, a regular expression saying "any sequence composed of one or more occurrence of any the letters A to Z" could be used to identify a word. A similar regular expression, "any sequence composed of one or more occurrence of any the digits 0 to 9" can be used to identify whole numbers.
A full explanation of the syntax of Java regular expressions is beyond the scope of this document. Simple tutorials can be found on the web, in many books and via Sun's official Java documentation.