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

Hierarchy

  • RegExp

Index

Methods

__@match

  • Matches a string with this regular expression, and returns an array containing the results of that search.

    Parameters

    • string: string

      A string to search within.

    Returns RegExpMatchArray | null

__@replace

  • __@replace(string: string, replaceValue: string): string
  • __@replace(string: string, replacer: function): string
  • Replaces text in a string, using this regular expression.

    Parameters

    • string: string

      A String object or string literal whose contents matching against this regular expression will be replaced

    • replaceValue: string

      A String object or string literal containing the text to replace for every successful match of this regular expression.

    Returns string

  • Replaces text in a string, using this regular expression.

    Parameters

    • string: string

      A String object or string literal whose contents matching against this regular expression will be replaced

    • replacer: function

      A function that returns the replacement text.

        • (substring: string, ...args: any[]): string
        • Parameters

          • substring: string
          • Rest ...args: any[]

          Returns string

    Returns string

__@search

  • __@search(string: string): number
  • Finds the position beginning first substring match in a regular expression search using this regular expression.

    Parameters

    • string: string

      The string to search within.

    Returns number

__@split

  • __@split(string: string, limit?: number): string[]
  • Returns an array of substrings that were delimited by strings in the original input that match against this regular expression.

    If the regular expression contains capturing parentheses, then each time this regular expression matches, the results (including any undefined results) of the capturing parentheses are spliced.

    Parameters

    • string: string

      string value to split

    • Optional limit: number

      if not undefined, the output array is truncated so that it contains no more than 'limit' elements.

    Returns string[]

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