textConvert
    Preparing search index...

    Function extractUrls

    • Extracts all URLs found in a block of text, rather than validating a single string like isUrl does.

      Parameters

      • text: string

        Text to search for URLs.

      Returns string[]

      An array of the URLs found, in the order they appear.

      extractUrls('Check out https://example.com and http://another.example.org/path for details.');
      // ['https://example.com', 'http://another.example.org/path']