[eluser]sophistry[/eluser]
yeah, it's me, back to back posts. but, i couldn't wait.
ok, i put on my REGEX thinking cap and came up with a way to exclude matching on multi-periods (a fix suggested by inparo):
Code:
preg_match_all(";([$chars_not_dot](?:[$chars_not_dot]|[.](?![.]))+)@((?:[-a-z0-9]+)\.(?:[-.a-z0-9]{2,}));i", $s, $matches);
it's pretty cool regex if i do say so myself; i used my first negative lookahead assertion.
that little squeegee says "match a dot only if it is not followed by another dot."
EDIT: i changed the last part of the regex to look for at least 2 chars instead of the wildcard 0 or more * that was there on first post.