I want my regex accept only email domain like this: .com .co.id com.sg com.au
I tried create regex like this: ^[a-zA-Z0-9]+(?:[.\-_]{1}[a-zA-Z0-9]+)*@(?:[a-zA-Z0-9]+[\-])?(?:[a-zA-Z0-9]+\.)(?:(?:[a-zA-Z]{2,3}\.){1})?[a-zA-Z]{2,3}$
but it accept domain .com.com
没有评论:
发表评论