Copy link to clipboard
Copied
Hello, all,
I'm in the process of writing something to add to an existing project. The ability for a user to include up to five email addresses to CC an attachment to said addresses. I've got the validation working as I want it. Now, just for giggles, I'd like to have the ability to highlight what part of a malformed email address didn't match the email mask.
I've seen examples where, in a string search, the entered word would be highlighted in other words. For example: A list of words like, "car", "escape", "abracadabra", and someone enters "ca", then it would appear like:
car
escape
abracadabra
But I wonder if RegEx can be used to highlight what failed validation of an email address?
V/r,
^ _ ^
Copy link to clipboard
Copied
Failed e-mail syntax patterns are mostly caused by typos. For example, a missing @ sign or 2 dots before the TLD. In some cases, an unrecognized TLD (.com.tv). I don't know how you would express that in a meaningful way with RegEx, sorry.
Copy link to clipboard
Copied
Hi, Nancy,
I'm just assuming that it can be done.. mostly because 99% of RegEx is unknown to me, and I know a lot more can be done with it than I could ever dream. I will try to reverse-engineer the string search examples and see if I can somehow get a highlight on what failed, but I'm not very hopeful. 🙂
V/r,
^ _ ^