|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--net.sf.saxon.instruct.RegexIterator
Class RegexIterator - provides an iterator over matched and unmatched substrings
| Constructor Summary | |
RegexIterator(java.lang.String string,
java.util.regex.Pattern pattern)
Construct a RegexIterator. |
|
| Method Summary | |
Item |
current()
Get the current item in the sequence |
SequenceIterator |
getAnother()
Get another iterator over the same items |
java.lang.String |
getRegexGroup(int number)
Get a substring that matches a parenthesised group within the regular expression |
SequenceIterator |
getRegexGroupIterator()
Get a sequence containing all the regex groups (except group 0, because we want to use indexing from 1) |
boolean |
isMatching()
Determine whether the current item is a matching item or a non-matching item |
Item |
next()
Get the next item in the sequence |
int |
position()
Get the position of the current item in the sequence |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RegexIterator(java.lang.String string,
java.util.regex.Pattern pattern)
string - the string to be analysedpattern - the regular expression| Method Detail |
public Item next()
next in interface SequenceIteratorpublic Item current()
current in interface SequenceIteratorpublic int position()
position in interface SequenceIteratorpublic SequenceIterator getAnother()
getAnother in interface SequenceIteratorpublic boolean isMatching()
public java.lang.String getRegexGroup(int number)
number - the number of the group to be obtained
public SequenceIterator getRegexGroupIterator()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||