textConvert
    Preparing search index...

    Function extractEmails

    • Extracts all email addresses found in a block of text, rather than validating a single string like isEmail does.

      Parameters

      • text: string

        Text to search for email addresses.

      Returns string[]

      An array of the email addresses found, in the order they appear.

      extractEmails('Contact us at hello@example.com or support@example.org for help.');
      // ['hello@example.com', 'support@example.org']