• Finds the first substring match in a regular expression search.

    Parameters

    • regexp: string | RegExp

      The regular expression pattern and applicable flags.

    Returns number

  • Finds the first substring match in a regular expression search.

    Parameters

    • searcher: {
          [search](string: string): number;
      }

      An object which supports searching within a string.

      • [search]:function
        • Parameters

          • string: string

          Returns number

    Returns number