JavaScript RegEx validation: how to highlight what didn't match
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,
^ _ ^
