Man, what a load of crap. First of all, it's perfectly valid for an email address to contain a newline character. Just stick a backslash in front of it, or put it inside quotes.
Second, a dot matches any character that's not a newline,
but only outside a character class.
[.\S] matches the same as
[BigPurpleRats\S]. Your regex can also be written much simpler:
/^\S+\@\S\.\w+/. Which isn't a very useful regex - it's not even anchored at the end. But it rejects valid regexes, and accepts invalid ones. And yeah, your regex rejects '@.com' as an email address,
but it accepts '.@..com'. Yippy.
Abigail