I have an email in the following format:
joe+12312313@aDomain.com
First, I need to make sure the email's domain equals to aDomain.com
Next, I need to extract everything before the +
sign
It would be nice if I can get a the following object:
var objParts = {
localPart: null,
domain: null,
};
console.log(objParts.localPart) // joe
console.log(objParts.domain) // aDomain.com
I know we have to use Regex. I am new to JS.