I'd be disinclined myself to try and do it in one ereg. I'd first be tempted to write
if(strlen($str)<30 && preg_match('/[-a-z\d.][a-z][-a-z\d.]$/i',$str))
It checks for #4 without needing to do any expensive regex stuff.
An ereg instead of a preg_match would be
ereg('-A-Za-z0-9.][A-Za-z][-A-Za-z0-9.]$',$str)
A single regex for all five conditions is possible but it would be very ugly. Basically it would start off:
"/(([a-z][-a-z\d.]{,28})|([-a-z\d.][a-z][-a-z\d.]{,27})|([-a-z\d.]{2}[a-z][-a-z\d._]{,26})|...
and end
...|([-a-z\d.]{26}[a-z][-a-z\d.]{,2})|([-a-z\d.]{27}[a-z][-a-z\d.]{,1})|([-a-z\d._]{28}[a-z]))$/i"
The problem being that it has to keep count of how many characters it read before it hit the letter, so's it doesn't read too many more afterwards. Regexps aren't very good at counting.
Five minutes after writing it you'll have no idea what it does. It would also be incredibly slow.