Cómo usar la expresión regular en NodeJS

const regex = new RegExp('https:\\/\\/\\w*\\.\\w*.*', 'g');
garzj