Packages

class Match extends MatchData

Provides information about a successful match.

Source
Regex.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Match
  2. MatchData
  3. AnyRef
  4. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Match(source: CharSequence, matcher: Matcher, _groupNames: Seq[String])

Value Members

  1. def after(i: Int): CharSequence

    The char sequence after last character of match in group i, or null if nothing was matched for that group.

    The char sequence after last character of match in group i, or null if nothing was matched for that group.

    Definition Classes
    MatchData
  2. def after: CharSequence

    Returns char sequence after last character of match, or null if nothing was matched.

    Returns char sequence after last character of match, or null if nothing was matched.

    Definition Classes
    MatchData
  3. def before(i: Int): CharSequence

    The char sequence before first character of match in group i, or null if nothing was matched for that group.

    The char sequence before first character of match in group i, or null if nothing was matched for that group.

    Definition Classes
    MatchData
  4. def before: CharSequence

    The char sequence before first character of match, or null if nothing was matched.

    The char sequence before first character of match, or null if nothing was matched.

    Definition Classes
    MatchData
  5. def end(i: Int): Int

    The index following the last matched character in group i.

    The index following the last matched character in group i.

    Definition Classes
    MatchMatchData
  6. val end: Int

    The index following the last matched character.

    The index following the last matched character.

    Definition Classes
    MatchMatchData
  7. def force: Match.this.type

    The match itself with matcher-dependent lazy vals forced, so that match is valid even once matcher is advanced.

  8. def group(id: String): String

    Returns the group with the given name.

    Returns the group with the given name.

    Uses explicit group names when supplied; otherwise, queries the underlying implementation for inline named groups. Not all platforms support inline group names.

    id

    The group name

    returns

    The requested group

    Definition Classes
    MatchData
    Exceptions thrown

    IllegalArgumentException if the requested group name is not defined

  9. def group(i: Int): String

    The matched string in group i, or null if nothing was matched.

    The matched string in group i, or null if nothing was matched.

    Definition Classes
    MatchData
  10. def groupCount: Int

    The number of subgroups.

    The number of subgroups.

    Definition Classes
    MatchMatchData
  11. def matched: String

    The matched string, or null if nothing was matched.

    The matched string, or null if nothing was matched.

    Definition Classes
    MatchData
  12. val source: CharSequence

    The source from which the match originated

    The source from which the match originated

    Definition Classes
    MatchMatchData
  13. def start(i: Int): Int

    The index of the first matched character in group i.

    The index of the first matched character in group i.

    Definition Classes
    MatchMatchData
  14. val start: Int

    The index of the first matched character.

    The index of the first matched character.

    Definition Classes
    MatchMatchData
  15. def subgroups: List[String]

    All capturing groups, i.e., not including group(0).

    All capturing groups, i.e., not including group(0).

    Definition Classes
    MatchData
  16. def toString(): String

    The matched string; equivalent to matched.toString.

    The matched string; equivalent to matched.toString.

    returns

    a String representation of the object.

    Definition Classes
    MatchData → AnyRef → Any

Deprecated Value Members

  1. val groupNames: Seq[String]

    The names of the groups, or an empty sequence if none defined

    The names of the groups, or an empty sequence if none defined

    Definition Classes
    MatchMatchData
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.7) groupNames does not include inline group names, and should not be used anymore