Number plan understanding Match Expression : ^(\+)([1-9]\d{1,14})$ , Normalized Number Expression : 031850$2

Need Help on understanding the expressions used in number planning.
Please help me to understand the above expression.

Thanks in Advance.
Akhil Angara

Good afternoon Akhil070.

I normally use the sites below to understand my regular expression. I hope helped you.

Follow below the result from regex101

^ asserts position at start of a line

1st Capturing Group

(+)

+ matches the character + with index 4310 (2B16 or 538) literally (case sensitive)

2nd Capturing Group

([1-9]\d{1,14})

Match a single character present in the list below

[1-9]

1-9 matches a single character in the range between 1 (index 49) and 9 (index 57) (case sensitive)

\d

matches a digit (equivalent to [0-9])

{1,14} matches the previous token between 1 and 14 times, as many times as possible, giving back as needed (greedy)

$ asserts position at the end of a line

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.