Regular Expression Package for Java
The Regular Expresions that are supported by MailFaces are
modeled after the perl expressions.
NOTE: you have to put double back-slashes in your RE's when
you supply them in Java Strings. For example: "\\sWord\\s".
- Match any character literally that doesn't have special
significance. Below are characters with special significance. You
can backslash special characters to have them treated as literals.
- Match any character.
- Match any in a class of characters, e.g., [a-z] matches all the
characters between 'a' and 'z' (inclusive).
- Match any NOT in a class of characters, e.g., [^a-z]
matches all characters NOT between 'a' and 'z' (inclusive).
- Matches a white space character (Space, Linefeed, Return, Tab).
- Matches a non-white space character.
- Matches word characters, e.g., same as [a-zA-Z0-9_]
- Matches non-word characters (opposite of \w)
- Matches digits 0-9.
- Matches everything except 0-9.
- \n, \r, \f, \t
- Matches NL, CR, FF, TAB respectively.
- Matches at the end of a line.
- Matches at the beginning of a line.
- Matches if at a word boundery (consumes no characters).
- Matches if NOT at a word boundery.
- Marks beginning of a group of matched characters.
- Marks ending of a group of matched characters.
Separates two alternative matches,
e.g., abc|def matches abc or def. Parentheses are used to specify
precedence, and "|" is by default the lowest precedence.
- \0, ..., \9
- Matches a previous (parenthisized) group of
- Match one or more occurrences of previous RE
- Match zero or more occurrences of previous RE
- Match zero or one occurrences of previous RE