普通的前pression用于验证阿联酋号 [英] Regular expression for validating UAE numbers
问题描述
我需要的正则表达式这也验证了阿联酋的手机号码就像
9710501234566或
+971(050)(123 4566)
块引用>目前我使用
<$p$p><$c$c>^(\\+971[\\s]{0,1}[\\-]{0,1}[\\s]{0,1}|[\\s]{0,1}0)(5[056]{1})[\\s]{0,1}[\\-]{0,1}[\\s]{0,1}[1-9]{1}[0-9]{6}$
你能帮助我吗?我不与常规的前pressions真的很好...
解决方案+971(050)(123 4566)是无效的格式
它应该是+971(50)(123 4566)这将允许先从只数
50(阿联酋电信)
52(杜)
55(杜)
56(阿联酋电信)/ ^ 5(0 | 2 | 5 | 6)\\ D {7} $ /;
开始,5,然后匹配了0,2,5,6,然后7位号码
下面也应努力开始9715格式/ ^ + 9715(0 | 2 | 5 | 6)\\ D {7} $ /;
I need regex which validates UAE mobile phone number like
+9710501234566 or
+971 (050) (123 4566)
Currently I am using
^(\+971[\s]{0,1}[\-]{0,1}[\s]{0,1}|[\s]{0,1}0)(5[056]{1})[\s]{0,1}[\-]{0,1}[\s]{0,1}[1-9]{1}[0-9]{6}$
Could you help me please? I'm not really good with regular expressions...
解决方案+971 (050) (123 4566) is invalid format it should be +971 (50) (123 4566)
this will allow only number starting with 50 (etisalat) 52 (du) 55 (du) 56 (etisalat)
/^5(0|2|5|6)\d{7}$/;
start with 5 and then matches either 0,2,5,6 and then 7 digits numbers below also should work starting with 9715 format
/^+9715(0|2|5|6)\d{7}$/;
这篇关于普通的前pression用于验证阿联酋号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!