RegExp | typescript
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • RegExp

Index

Properties

global

global: boolean

Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only.

ignoreCase

ignoreCase: boolean

Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only.

lastIndex

lastIndex: number

multiline

multiline: boolean

Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only.

source

source: string

Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal.

Methods

compile

  • compile(): this
  • Returns this

exec

  • Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.

    Parameters

    • string: string

      The String object or string literal on which to perform the search.

    Returns RegExpExecArray | null

test

  • test(string: string): boolean
  • Returns a Boolean value that indicates whether or not a pattern exists in a searched string.

    Parameters

    • string: string

      String on which to perform the search.

    Returns boolean

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc