The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

^[_a-z0-9-]+ The string begins with one or more characters a-z, 0-9, underscores and hyphens

(.[_a-z0-9-]+)* and is followed by zero or more occurances of a dot followed by some characters again (sometimes people have some.name@address.com, and we want to allow the period between some and name, but not two periods in a row).

@ followed by the @ sign

([0-9a-z][0-9a-z-]*[0-9a-z].)+ followed by one or more of the combination of (1) a letter/number, (2) zero or more letters/numbers/hyphens, (3) a letter/number and (4) a period.

[a-z]{2}[mtgvu]?$ and the string ends with two letters (and if it has a third letter, it has to be one of "mtgvu" (as in .com, .gov etc).

-----------

Padders, your expression checks that the string begins with one or more characters (any character) followed by the @ sign, followed by one or more characters, followed by a period which is followed by one or more characters (the last set of characters would typically be the .com, .org etc...)

Those would be fine because the com (from com.au) and co (from co.uk) would get picked up by the first regex after the @ sign, and the .au/uk/ir would get picked up by the last part of the regex -- the [a-z]{2} means that the last part has to have any two letters and the [mtgvu]? means that it can have a third letter, but if there is the third letter, it has to be one of those five letters.