Index of all Fields and Methods
All Packages  Class Hierarchy

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Index of all Fields and Methods

A

accept(File, String). Method in class pat.Regex
This method implements FilenameFilter, allowing one to use a Regex to search through a directory using File.list
add(Pattern). Method in class pat.Pattern
add a Pattern to the singly-linked Pattern chain.
add(Pattern). Method in class pat.Regex
add the next Pattern in the chain or set the Pattern if we have null so far
allTokens(). Method in class pat.RegexTokenizer
Returns all tokens in the String

C

cbits. Variable in class pat.Pthings
The mask to use when dontMatchInQuotes is set.
charsMatched(). Method in class pat.RegRes
After a successful match, this returns the number of characters in the match, or -1 if the match failed.
charsMatched(int). Method in class pat.RegRes
Obtains the number of characters matched by backreference i, or -1 if backreference i was not matched
clone(). Method in class pat.Regex
A clone by any other name would smell as sweet.
clone(). Method in class pat.RegRes
compile(String). Method in class pat.Regex
This method tells the Regex object what Pattern to use by future calls to search(String).
compile1(StrPos, Rthings). Method in class pat.Regex
compile1 compiles one Pattern element, it can be over-ridden to allow the Regex compiler to understand new syntax.
countTokens(). Method in class pat.RegexTokenizer
Determines the # of remaining tokens

D

didMatch(). Method in class pat.RegRes
Contains true if the last match was successful.
dontMatchInQuotes. Variable in class pat.Regex
Example of use:
	Regex r = r.Regex("a*b");
	r.matchAt("a'b'ab",0);
	// r.charsMatched() now contains 3
	r.dontMatchInQuotes = true;
	r.matchAt("a'b'ab",0);
	// r.charsMatched() now contains 6
dontMatchInQuotes. Variable in class pat.Rthings
Needed in case (?Q) is encountered, to pass back the message that dontMatchInQuotes should be set.
dup(StrPos). Method in class pat.StrPos
copy a StrPos from sp to this.

E

equals(RegRes). Method in class pat.RegRes
ESC. Static variable in class pat.Pattern
The ESC character, the user can provide his own value for the escape character through regex.esc
esc. Variable in class pat.Regex
esc contains the escape character.
escaped(). Method in class pat.StrPos
Returns true if the character is escaped (preceeded by "\").

G

getNext(). Method in class pat.Pattern
This gets the next element of a Pattern that we wish to match.
getPatInt(). Method in class pat.StrPos

H

hasMoreElements(). Method in class pat.RegexTokenizer
Tells whether there are more tokens in the pattern.
hasMoreTokens(). Method in class pat.RegexTokenizer
Tells whether there are more tokens in the pattern, but in the fashion of StringTokenizer.

I

ignoreCase. Variable in class pat.Pthings
Whether we should ignore the case of letters in this match.
ignoreCase. Variable in class pat.Regex
Example of use:
	Regex r = r.Regex("[a-c]");
	r.matchAt("B",0);
	// fails
	r.ignoreCase = true;
	r.matchAt("B",0);
	// succeeds
ignoreCase. Variable in class pat.Rthings
Needed in case (?i) is encountered, to pass back the message that ignoreCase should be set.
inc(). Method in class pat.StrPos
Advance the place where StrPos points within the String.

L

left(). Method in class pat.RegRes
This returns the part of the string that preceeds the match, or null if the match failed.
left(int). Method in class pat.RegRes
This returns the part of the string that follows the ith backreference, or null if the backreference did not match.

M

marks. Variable in class pat.Pthings
Used to keep track of backreferences.
match(char). Method in class pat.StrPos
Increment the string pointer if the character pointed to is not escaped (preceeded by "\"), and matches
ch
.
match(String). Method in class pat.StrPos
Increment the string pointer by each character in
st
that matches a non-escaped character.
match(String, Pthings). Method in class pat.Pattern
This can be used to perform a match test from within class Pattern.
matchAt(String, int). Method in class pat.Regex
Attempt to match a Pattern beginning at a specified location within the string
matchAt(String, int, Pthings). Method in class pat.Pattern
This can be used to perform a match test from within class Pattern.
matchFrom(). Method in class pat.RegRes
After a successful match, this returns the location of the first matching character, or -1 if the match failed.
matchFrom(int). Method in class pat.RegRes
Obtains the position backreference number i begins to match, or -1 if backreference i was not matched.
matchInternal(int, Pthings). Method in class pat.Pattern
The interal match function, it must be provided by any class which wishes to extend Pattern.

N

nextElement(). Method in class pat.RegexTokenizer
This should always be cast to a String, as in StringTokenizer, and as in StringTokenizer one can do this by calling nextString().
nextMatch(int, Pthings). Method in class pat.Pattern
This determines if the remainder of a Pattern matches.
nextString(). Method in class pat.Pattern
This is a toString() for the remainder of the Pattern elements after this one.
nextToken(). Method in class pat.RegexTokenizer
This is the equivalent (String)nextElement().
nextToken(Regex). Method in class pat.RegexTokenizer
This asks for the next token, and changes the pattern being used at the same time.
nextToken(String). Method in class pat.RegexTokenizer
This asks for the next token, and changes the pattern being used at the same time.
numSubs(). Method in class pat.RegRes
This returns the number of backreferences (parenthesis) in the pattern, i.e.

P

Pattern(). Constructor for class pat.Pattern
Pthings(). Constructor for class pat.Pthings

R

Regex(). Constructor for class pat.Regex
Initializes the object without a Pattern.
Regex(Regex). Constructor for class pat.Regex
Essentially clones the Regex object
Regex(String). Constructor for class pat.Regex
The String s is automatically compiled for use by search(String)
RegexTokenizer(String, Regex). Constructor for class pat.RegexTokenizer
Initialize the tokenizer with a Regex object.
RegexTokenizer(String, String). Constructor for class pat.RegexTokenizer
Initialize the tokenizer with a string of text and a pattern
RegRes(). Constructor for class pat.RegRes
RegRes(RegRes). Constructor for class pat.RegRes
RegSyntax(). Constructor for class pat.RegSyntax
result(). Method in class pat.Regex
Return a clone of the underlying RegRes object.
right(). Method in class pat.RegRes
This returns the part of the string that follows the match, or null if the backreference did not match.
right(int). Method in class pat.RegRes
This returns the string to the right of the ith backreference, or null if the backreference did not match.

S

search(String). Method in class pat.Regex
Search through a Pattern for the first occurrence of a match.
searchFrom(String, int). Method in class pat.Regex
Search through a Pattern for the first occurence of a match, but start at position
start
setParent(Pattern). Method in class pat.Pattern
Call this method if you have a pattern element that takes a sub pattern (such as Or), and after you have added a sub pattern to the current pattern element.
src. Variable in class pat.Pthings
The current text we are attempting to match.
StrPos(String, int). Constructor for class pat.StrPos
Initialize a StrPos by giving it a String, and a position within the String.
StrPos(StrPos). Constructor for class pat.StrPos
initialize a StrPos from another StrPos.
substring(). Method in class pat.RegRes
Obtains the match if successful, null otherwise
substring(int). Method in class pat.RegRes
Obtains a substring matching the nth set of parenthesis from the pattern.

T

toString(). Method in class pat.Pattern
Conversion to a String
toString(). Method in class pat.Regex
Converts the stored Pattern to a String
toString(). Method in class pat.RegRes

V

val. Variable in class pat.Rthings
The numeric identity of the next () to be encountered while compiling the pattern.
version(). Method in class pat.Regex
The version of this package