All Packages Class Hierarchy This Package Previous Next Index
Class gnu.regexp.RETest
java.lang.Object
|
+----gnu.regexp.RETest
- public class RETest
- extends Object
-
main(String[])
- RETest provides a simple way to test regular expressions.
main
public static void main(String args[]) throws REException
- 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.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.
- Parameters:
- args
- The command line arguments (an array of Strings).
- Throws: REException
- There was an error compiling or executing the regular expression.
All Packages Class Hierarchy This Package Previous Next Index