开发者

regular expression domain address

i am using this regular expression and it works fine for the two dots which accepts abc.com.ae or开发者_如何学Python 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})?$


^([A-Za-z0-9]{1,30}\.)+[a-z]{3}((\.)[a-z]{2})?$

i hope th is makes you happy, whatever you are trying to accomplish...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜