|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gnu.regexp.util.RETest
public class RETest
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.
Method Summary | |
---|---|
static void |
main(String[] argv)
Invokes the test function with the command line arguments specified. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void main(String[] argv) throws gnu.regexp.REException
argv
- The command line arguments.
gnu.regexp.REException
- There was an error compiling or executing the regular expression.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |