Regex for the validation of .au domain names


I need a quick regexp for validating that a string is a valid .au domain name. For example:

all of these should be considered valid.

This should be pretty simple for someone not as hopeless with regexps as I am. Any ideas?

If you want to only allow certain secondary TLDs in the .au space:


Modify the list of secondaries separated by |'s as you desire.

If you don't mind about strictly validating the secondary TLD:


And if you want to allow more subdomains (i.e.


You may need to use a-zA-Z instead of \a if the particular regex engine you're using doesn't support the latter.