正则

澳大利亚电话:^(?:\+?(61))? ?(?:\((?=.*\)))?(0?[2-57-8])\)? ?(\d\d(?:[- ](?=\d{3})|(?!\d\d[- ]?\d[- ]))\d\d[- ]?\d[- ]?\d{3})

参考网址:

https://stackoverflow.com/questions/39990179/regex-for-australian-phone-number-validation

https://regex101.com/r/dkFASs/6

 固定电话格式:区号+电话号码

 移动电话格式:电话号码

 

匹配邮箱:

^[A-Za-z0-9._%-]+@([A-Za-z0-9-]+\.)+[A-Za-z]{2,4}$

 

posted @ 2020-09-16 17:32  haha-uu  阅读(150)  评论(0编辑  收藏  举报