How can I extract email address from a big string by regex

Let’s say I have a big string what I fetched from a URL like this,

const axios = require('axios');

const pattern = /regex for email/;
const htmlContent = axios('https://www.sinclairmethod.org/').then(res => res.data ).then(data => {
    console.log(data.match(pattern));
});

This should return an email address if that page have one
so I need a pattern basically

@mizanmahi hey,

check this out https://stackoverflow.com/a/46181 should be what your looking for.

1 Like