Looking at the posts here for email address validation, I am looking to be much more liberal about the client side test I am performing.
The closest I have seen so far is:
^([\w-\.]+)@((\[[0–9]{1,3}\.[0–9]{1,3}\.[0–9]{1,3}\.)|(([\w-]+\.)+)) ([a-zA-Z]{2,4}|[0–9]{1,3})(\]?)$
That will not match this#[email protected], which according to RFC is valid
- Uppercase and lowercase English letters (a-z, A-Z)
- Digits 0 through 9
- Characters ! # $ % & ' * + - / = ? ^ _ ` { | } ~
- Character . (dot, period, full stop) provided that it is not the first or last character, and provided also that it does not appear two or more times consecutively.
I want a pretty simple match:
- Does not start with .
- Any character allowed up to the @
- Any character allowed after the @
- No consecutive . or @ allowed
- Part after the last . (tld) must be [a-z0-9-]
I will use \i to make the search case insensitive. The consecutive characters is where I am getting hung up on.