scala.util.matching.Regex

class MatchIterator

[source: scala/util/matching/Regex.scala]

class MatchIterator(val source : java.lang.CharSequence, val regex : Regex, val groupNames : Seq[java.lang.String])
extends Iterator[java.lang.String] with MatchData
A class to step through a sequence of regex matches
Method Summary
def end : Int
The index of the last matched character
def end (i : Int) : Int
The index following the last matched character in group i
def groupCount : Int
The number of subgroups
def hasNext : Boolean
Is there another match?
def matchData : Iterator[Match]
Convert to an iterator that yields MatchData elements instead of Strings
def next : java.lang.String
The next matched substring of `source'
def start (i : Int) : Int
The index of the first matched character in group i
def start : Int
The index of the first matched character
override def toString : java.lang.String
The matched string; equivalent to matched.toString
Methods inherited from MatchData
matched, group, subgroups, before, before, after, after, group
Methods inherited from Iterator
take, drop, slice, map, ++, flatMap, filter, filterNot, partialMap, takeWhile, partition, dropWhile, zip, padTo, zipWithIndex, zipAll, foreach, forall, exists, contains, find, indexWhere, indexOf, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, reduceLeftOption, reduceRightOption, buffered, grouped, sliding, length, duplicate, patch, copyToArray, copyToArray, copyToArray, copyToBuffer, toList, toStream, toSeq, mkString, mkString, mkString, addString, addString, addString, append, findIndexOf, collect, counted, readInto, readInto, readInto
Methods inherited from AnyRef
getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Method Details
def hasNext : Boolean
Is there another match?
Overrides
Iterator.hasNext

def next : java.lang.String
The next matched substring of `source'
Overrides
Iterator.next

override def toString : java.lang.String
The matched string; equivalent to matched.toString
Overrides
Iterator.toString, MatchData.toString

def start : Int
The index of the first matched character
Overrides
MatchData.start

def start(i : Int) : Int
The index of the first matched character in group i
Overrides
MatchData.start

def end : Int
The index of the last matched character
Overrides
MatchData.end

def end(i : Int) : Int
The index following the last matched character in group i
Overrides
MatchData.end

def groupCount : Int
The number of subgroups
Overrides
MatchData.groupCount

def matchData : Iterator[Match]
Convert to an iterator that yields MatchData elements instead of Strings