scala.scalajs.js

RegExp

class RegExp extends Object

The RegExp constructor creates a regular expression object for matching text with a pattern.

MDN

Annotations
@RawJSType() @native() @JSGlobal()
Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. RegExp
  2. Object
  3. Any
  4. AnyRef
  5. Any
Implicitly
  1. by any2stringadd
  2. by any2stringfmt
  3. by any2ArrowAssoc
  4. by any2Ensuring
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RegExp(pattern: RegExp)

    Creates a new RegExp with the same pattern and flags as the given one.

  2. new RegExp(pattern: String, flags: String = "")

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: scala.Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from RegExp to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (RegExp, B)

    Implicit information
    This member is added by an implicit conversion from RegExp to ArrowAssoc[RegExp] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. final def ==(arg0: scala.Any): Boolean

    Definition Classes
    Any
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def ensuring(cond: (RegExp) ⇒ Boolean, msg: ⇒ scala.Any): RegExp

    Implicit information
    This member is added by an implicit conversion from RegExp to Ensuring[RegExp] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: (RegExp) ⇒ Boolean): RegExp

    Implicit information
    This member is added by an implicit conversion from RegExp to Ensuring[RegExp] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean, msg: ⇒ scala.Any): RegExp

    Implicit information
    This member is added by an implicit conversion from RegExp to Ensuring[RegExp] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: Boolean): RegExp

    Implicit information
    This member is added by an implicit conversion from RegExp to Ensuring[RegExp] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. def equals(arg0: scala.Any): Boolean

    Definition Classes
    AnyRef → Any
  16. def exec(string: String): ExecResult

    The exec() method executes a search for a match in a specified string.

    The exec() method executes a search for a match in a specified string. Returns a result array, or null.

    If you are executing a match simply to find true or false, use the RegExp.test() method or the String.search() method.

    If the match succeeds, the exec method returns an array and updates properties of the regular expression object. The returned array has the matched text as the first item, and then one item for each capturing parenthesis that matched containing the text that was captured.

    If the match fails, the exec method returns null.

    MDN

  17. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from RegExp to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  19. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  20. val global: Boolean

    The value of global is a Boolean and true if the "g" flag was used; otherwise, false.

    The value of global is a Boolean and true if the "g" flag was used; otherwise, false. The "g" flag indicates that the regular expression should be tested against all possible matches in a string.

    MDN

  21. def hasOwnProperty(v: String): Boolean

    Tests whether this object has the specified property as a direct property.

    Tests whether this object has the specified property as a direct property.

    Unlike js.Object.hasProperty, this method does not check down the object's prototype chain.

    MDN

    Definition Classes
    Object
  22. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  23. val ignoreCase: Boolean

    The value of ignoreCase is a Boolean and true if the "i" flag was used; otherwise, false.

    The value of ignoreCase is a Boolean and true if the "i" flag was used; otherwise, false. The "i" flag indicates that case should be ignored while attempting a match in a string.

    MDN

  24. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  25. def isPrototypeOf(v: Object): Boolean

    Tests whether this object is in the prototype chain of another object.

    Tests whether this object is in the prototype chain of another object.

    Definition Classes
    Object
  26. var lastIndex: Int

    The lastIndex is a read/write integer property of regular expressions that specifies the index at which to start the next match.

    The lastIndex is a read/write integer property of regular expressions that specifies the index at which to start the next match.

    MDN

  27. val multiline: Boolean

    The value of multiline is a Boolean and is true if the "m" flag was used; otherwise, false.

    The value of multiline is a Boolean and is true if the "m" flag was used; otherwise, false. The "m" flag indicates that a multiline input string should be treated as multiple lines. For example, if "m" is used, "^" and "$" change from matching at only the start or end of the entire string to the start or end of any line within the string.

    MDN

  28. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  29. final def notify(): Unit

    Definition Classes
    AnyRef
  30. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  31. def propertyIsEnumerable(v: String): Boolean

    Tests whether the specified property in an object can be enumerated by a call to js.Object.properties, with the exception of properties inherited through the prototype chain.

    Tests whether the specified property in an object can be enumerated by a call to js.Object.properties, with the exception of properties inherited through the prototype chain. If the object does not have the specified property, this method returns false.

    MDN

    Definition Classes
    Object
  32. val source: String

    The source property returns a String containing the text of the pattern, excluding the forward slashes.

    The source property returns a String containing the text of the pattern, excluding the forward slashes. It is a read-only property of an individual regular expression instance. source does not contain any flags (like "g", "i" or "m") of the regular expression.

    MDN

  33. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  34. def test(string: String): Boolean

    The test() method executes a search for a match between a regular expression and a specified string.

    The test() method executes a search for a match between a regular expression and a specified string. Returns true or false.

    You can use test() whenever want to know whether a pattern is found in a string (similar to the String.search method); for more information (but slower execution) use the exec method (similar to the String.match method). As with exec (or in combination with it), test called multiple times on the same global regular expression instance will advance past the previous match.

    MDN

  35. def toLocaleString(): String

    Definition Classes
    Object
  36. def toString(): String

    Definition Classes
    AnyRef → Any
  37. def valueOf(): scala.Any

    Definition Classes
    Object
  38. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. def [B](y: B): (RegExp, B)

    Implicit information
    This member is added by an implicit conversion from RegExp to ArrowAssoc[RegExp] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Shadowed Implicit Value Members

  1. val self: scala.Any

    Implicit information
    This member is added by an implicit conversion from RegExp to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (regExp: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: scala.Any

    Implicit information
    This member is added by an implicit conversion from RegExp to StringFormat performed by method any2stringfmt in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (regExp: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def x: RegExp

    Implicit information
    This member is added by an implicit conversion from RegExp to ArrowAssoc[RegExp] performed by method any2ArrowAssoc in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (regExp: ArrowAssoc[RegExp]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: RegExp

    Implicit information
    This member is added by an implicit conversion from RegExp to Ensuring[RegExp] performed by method any2Ensuring in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (regExp: Ensuring[RegExp]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from scala.Any

Inherited by implicit conversion any2stringadd from RegExp to StringAdd

Inherited by implicit conversion any2stringfmt from RegExp to StringFormat

Inherited by implicit conversion any2ArrowAssoc from RegExp to ArrowAssoc[RegExp]

Inherited by implicit conversion any2Ensuring from RegExp to Ensuring[RegExp]

Ungrouped