gnu.regexp.util
Class RETest
public class RETest
extends java.lang.Object
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. When this option is used, RETest will report
average compile and match times.
Version:
- Wes Biggs
static void | main(argv[] ) - Invokes the test function with the command line arguments specified.
|
main
public static void main(argv[] )
throws REException
Invokes the test function with the command line arguments specified.
See class description for usage notes.
REException
- There was an error compiling or executing the regular expression.