public class Matcher
extends java.lang.Object
| Constructor and Description |
|---|
Matcher(javax.swing.text.Document document,
java.lang.String findString)
Creates a new instance of Matcher which
performs a case sensitive search.
|
Matcher(javax.swing.text.Document document,
java.lang.String findString,
boolean matchCase,
boolean matchWord)
Creates a new instance of Matcher
|
| Modifier and Type | Method and Description |
|---|---|
int |
find()
Attempts to find the next subsequence of the
input sequence that matches the pattern.
|
int |
find(int startIndex)
Resets this matcher and then attempts to find the next
subsequence of the input sequence that matches the pattern,
starting at the specified index.
|
java.lang.String |
getFindString() |
void |
reset()
Resets the startIndex of the matcher to 0.
|
public Matcher(javax.swing.text.Document document,
java.lang.String findString)
document - The document to be examinedfindString - The string to be searched.public Matcher(javax.swing.text.Document document,
java.lang.String findString,
boolean matchCase,
boolean matchWord)
document - The document to be examinedfindString - The string to be searched.matchCase - Set to true for case sensitive search.matchWord - Set to true for word match search.public java.lang.String getFindString()
public int find(int startIndex)
startIndex - the index from which to start the search.public int find()
This method starts at the beginning of the input sequence or, if a previous invocation of the method was successful and the matcher has not since been reset, at the first character not matched by the previous match.
public void reset()