RETest.java | Class | RETest provides a simple way to test regular expressions.
It runs from the command line using the Java interpreter.
To use it, enter the following from a command prompt (provided
that the Java system knows where to find the RETest bytecodes):
java gnu.regexp.util.RETest [regExp] [inputString]
where regExp is a regular expression (you'll probably have
to escape shell meta-characters) and inputString is the string
to match against (again, put it in quotes or escape any shell meta-
characters).
The test function will report the package version number, whether
the expression matches the input string, what the match it found was,
and the contents of any subexpressions, if applicable.
You may optionally add a third integer argument which is the number of
times to repeat the test. |