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 (i : Int) : Int
The index following the last matched character in group i
def end : Int
The index of the last matched character
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, append, ++, flatMap, filter, takeWhile, dropWhile, zip, zipWithIndex, foreach, forall, exists, contains, find, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, buffered, counted, duplicate, copyToArray, readInto, readInto, readInto, copyToBuffer, toList, mkString, mkString, addString
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