Packages

c

scalation.util

PatMatcher

class PatMatcher extends MatchResult with Matchable with Error

The PatMatcher class provides a simple means for using Java regular expressions. Following the Facade design pattern, it combines functionality from both Pattern and Matcher. A faster alternative is PatMatcherB, see below.

Linear Supertypes
Error, Matchable, MatchResult, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PatMatcher
  2. Error
  3. Matchable
  4. MatchResult
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new PatMatcher(regex: String)

    regex

    the regular expression pattern to be matched

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def =~(input: String): Boolean

    The equal-match operator determines whether the 'input' string matches the given 'regex' string.

    The equal-match operator determines whether the 'input' string matches the given 'regex' string.

    input

    the string to be matched

    Definition Classes
    PatMatcherMatchable
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  7. def end(group: Int): Int

    Return the offset after the last character of the subsequence captured by the given group during this match.

    Return the offset after the last character of the subsequence captured by the given group during this match.

    group

    the index of a capturing group in this matcher's pattern

    Definition Classes
    PatMatcher → MatchResult
  8. def end(): Int

    Return the offset after the last character matched.

    Return the offset after the last character matched.

    Definition Classes
    PatMatcher → MatchResult
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. def find(start: Int): Boolean

    Resets this matcher and then attempts to find the next subsequence of the input sequence that matches the pattern, starting at the specified index.

    Resets this matcher and then attempts to find the next subsequence of the input sequence that matches the pattern, starting at the specified index. Must call 'matcher' method first.

    start

    the index to start searching for a match

  12. def find(): Boolean

    Find the next occurrence of 'regex' in the 'input' string.

    Find the next occurrence of 'regex' in the 'input' string. Must call 'matcher' method first.

  13. final def flaw(method: String, message: String): Unit

    Show the flaw by printing the error message.

    Show the flaw by printing the error message.

    method

    the method where the error occurred

    message

    the error message

    Definition Classes
    Error
  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. def group(group: Int): String

    Return the input subsequence captured by the given group during the previous match operation.

    Return the input subsequence captured by the given group during the previous match operation.

    Definition Classes
    PatMatcher → MatchResult
  16. def group(): String

    Return the input subsequence matched by the previous match.

    Return the input subsequence matched by the previous match.

    Definition Classes
    PatMatcher → MatchResult
  17. def groupCount(): Int

    Return the number of capturing groups in this match result's pattern.

    Return the number of capturing groups in this match result's pattern.

    Definition Classes
    PatMatcher → MatchResult
  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. def lookingAt(): Boolean

    Match the input sequence, starting at the beginning of the region, against the pattern.

  21. def matcher(input: String): Matcher

    Create a matcher that will match the given 'input' against the regex pattern.

    Create a matcher that will match the given 'input' against the regex pattern.

    input

    the string to be matched

  22. def matches(): Boolean

    Match the entire region against the pattern.

  23. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  25. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  26. var regex: String
  27. def start(group: Int): Int

    Return the start index of the subsequence captured by the given group during this match.

    Return the start index of the subsequence captured by the given group during this match.

    group

    the index of a capturing group in this matcher's pattern

    Definition Classes
    PatMatcher → MatchResult
  28. def start(): Int

    Return the start index of the match.

    Return the start index of the match.

    Definition Classes
    PatMatcher → MatchResult
  29. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  30. def toString(): String

    Convert this PatMatcher object to its underlying regex string.

    Convert this PatMatcher object to its underlying regex string.

    Definition Classes
    PatMatcher → AnyRef → Any
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  33. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Error

Inherited from Matchable

Inherited from MatchResult

Inherited from AnyRef

Inherited from Any

Ungrouped