JSFiddle - React, Tailwind, and code Playground
JavaScript
const RE = /@.*$/;
const matches = RE.exec('[email protected]');
const domain = matches ? matches[0].substring(1).toLowerCase() : undefined;
// TODO: something
alert(domain);
const RE = /@.*$/;
const matches = RE.exec('[email protected]');
const domain = matches ? matches[0].substring(1).toLowerCase() : undefined;
// TODO: something
alert(domain);