> I also notice that your E-Mail test would fail with any domain that has more than two parts ..
Wrong, it would match because there is no anchor at the and of the regex. But the test is really bad anyway ...
> Suffice to say that it's impossible to write a regexp that parses E-Mail addresses.
See Jeffrey Friedl's regex that checks if an email address conforms to rfc822 published in
Mastering Regular Expressions. IIRC that regex is about 6k characters long, it is also included in
the module
Email::Valid which I would recommend for checking email addresses.
cheers,
snowcrash