i am using this regular expression and it works fine for the two dots which accepts abc.com.ae or abc.com , but i want to make it work for three dots like abc.abc.com.ae or abc.com.ae or abc.com (the first portion and the last portion is optional . how can i do that?`
^[A-Za-z0-9]{1,30}\.[a-z]{3}((\.)[a-z]{2})?$