| Home >> All >> gnu >> [ regexp Javadoc ] |
| | gnu.regexp.util.* (5) |
gnu.regexp: Javadoc index of package gnu.regexp.
Package Samples:
gnu.regexp.util
Classes:
RE: RE provides the user interface for compiling and matching regular expressions. A regular expression object (class RE) is compiled by constructing it from a String, StringBuffer or character array, with optional compilation flags (below) and an optional syntax specification (see RESyntax; if not specified, RESyntax.RE_SYNTAX_PERL5 is used). Once compiled, a regular expression object is reusable as well as threadsafe: multiple threads can use the RE instance simultaneously to match against different input text. Various methods attempt to match input text against a compiled regular expression. These ...
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, ...
REMatchEnumeration: An REMatchEnumeration enumerates regular expression matches over a given input text. You obtain a reference to an enumeration using the getMatchEnumeration() methods on an instance of RE. REMatchEnumeration does lazy computation; that is, it will not search for a match until it needs to. If you'd rather just get all the matches at once in a big array, use the getAllMatches() methods on RE. However, using an enumeration can help speed performance when the entire text does not need to be searched immediately. The enumerated type is especially useful when searching on a Reader or InputStream, because ...
UncheckedRE: UncheckedRE is a subclass of RE that allows programmers an easier means of programmatically precompiling regular expressions. It is constructed and used in exactly the same manner as an instance of the RE class; the only difference is that its constructors do not throw REException. Instead, if a syntax error is encountered during construction, a RuntimeException will be thrown. Note that this makes UncheckedRE dangerous if constructed with dynamic data. Do not use UncheckedRE unless you are completely sure that all input being passed to it contains valid, well-formed regular expressions for the ...
CharIndexed: Defines the interface used internally so that different types of source text can be accessed in the same way. Built-in concrete classes provide support for String, StringBuffer, InputStream and char[] types. A class that is CharIndexed supports the notion of a cursor within a block of text. The cursor must be able to be advanced via the move() method. The charAt() method returns the character at the cursor position plus a given offset.
RESyntax: An RESyntax specifies the way a regular expression will be compiled. This class provides a number of predefined useful constants for emulating popular regular expression syntaxes. Additionally the user may construct his or her own syntax, using any combination of the syntax bit constants. The syntax is an optional argument to any of the matching methods on class RE.
REException: This is the regular expression exception class. An exception of this type defines the three attributes: A descriptive message of the error. An integral type code equivalent to one of the statically defined symbols listed below. The approximate position in the input string where the error occurred.
Grep: Grep is a pure-Java clone of the GNU grep utility. As such, it is much slower and not as full-featured, but it has the advantage of being available on any system with a Java virtual machine.
REMatch: An instance of this class represents a match completed by a gnu.regexp matching function. It can be used to obtain relevant information about the location of a match or submatch.
REApplet: This is a simple applet to demonstrate the capabilities of gnu.regexp. To run it, use appletviewer on the reapplet.html file included in the documentation directory.
REFilterInputStream: Replaces instances of a given RE found within an InputStream with replacement text. The replacements are interpolated into the stream when a match is found.
Egrep: This is a front end to the gnu.regexp.util.Grep class which sets the syntax used to RE_SYNTAX_EGREP, which aims to emulate the standard UNIX egrep command.
BacktrackStack: An instance of this class represents a stack used for backtracking.
RETokenWordBoundary: Represents a combination lookahead/lookbehind for POSIX [:alnum:].
Tests: This is a very basic testsuite application for gnu.regexp.
REFilterReader: Replaces instances of a given RE with replacement text.
CharIndexedCharArray
CharIndexedInputStream
CharIndexedString
CharIndexedStringBuffer
IntPair
CharUnit
| Home | Contact Us | Privacy Policy | Terms of Service |