Regular expression for international phone numbers
Regular expression matching international numbers
Regular expression for international numbers ^[0-9]\d{1,14}$ starts with 0-9, total 1-15 digits
1-15 digits, does not start with 0 and can have two decimal places
^([1-9]\d{1,14}|\d)(\.\d\d)?$ So is 0 correct? If including 0, ^(?=[\d.]{1,15})([1-9]\d{1,14}|\d)(\.\d\d)?$ If not including it, ^(?=[\d.]{1,15})[1-9]\d{0,14}(\.\d\d)?$ /^1\d{10}$/ What does this mean? 1 must start with 11 digits mobile number
Domestic mobile is a regular expression, /regular/, ^ represents start, $ represents end, \d represents digit, {10} means the previous \d has 10 digits
It looks like a simple regular expression to verify if a mobile phone number is correct
打赏
-
Alipay QR Code Scan
-
WeChat Scan Pay