jrexx - automaton based regluar expression API for Java

J R E X X   S Y N T A X

Brief Background
A regular expression consists of a character string where some characters are given special meaning with regard to pattern matching. Regular expressions have been in use from the early days of computing, and provide a powerful and efficient way to parse, interpret and search and replace text within an application.

Supported Syntax
Within a regular expression, the following characters have special meaning:

Java Integration
In a Java environment, a regular expression operates on a string of Unicode characters, represented either as an instance of java.lang.String or as an array of the primitive char type. This means that the unit of matching is a Unicode character, not a single byte. Generally this will not present problems in a Java program, because Java takes pains to ensure that all textual data uses the Unicode standard.
Note: Currently jrexx only supports Unicode characters from HEX 0000-00FF.

Because Java string processing takes care of certain escape sequences, they are not implemented in jrexx. You should be aware that the following escape sequences are handled by the Java compiler if found in the Java source:

\b backspace
\f form feed
\n newline
\r carriage return
\t horizontal tab
\" double quote
\' single quote
\\ backslash
\xxx character, in octal (000-377)
\uxxxx Unicode character, in hexadecimal (0000-00FF)
In addition, note that the \u escape sequences are meaningful anywhere in a Java program, not merely within a singly- or doubly-quoted character string, and are converted prior to any of the other escape sequences. For example, the line
Pattern p = new Pattern("\u005cn");
would be converted by first replacing \u005c with a backslash, then converting \n to a newline. By the time the Pattern constructor is called, it will be passed a String object containing only the Unicode newline character.
This syntaxt description follows the structure of the gnu.regexp syntax description at http://www.cacas.org/java/gnu/regexp/syntax.html, but has nothing to do with it.