I need to write a regular expression that will be correct for telephone number with some rules:
1) max length 13 symbols
2) it should start from '+'
3) it should contain sonly numbers [0-9]
So, for example, it should be like this:
+447289347598342745
^\+→ the string must start with+. Note that+must be escaped because it has special meaning otherwise.\d→ equivalent to the character class[0-9]{1,13}→ there must be at least one and no more than 13 occurences of the digit charactersSo either use: