Difference between revisions of "M4 Regexp Examples"

From Kolmisoft Wiki
Jump to navigationJump to search
Line 1: Line 1:
Regexp is used to allow/deny CallerID/Destinations for [[M2 Origination Points | Origination Points]], [[M2 Termination Points | Termination Points]] and [[M2 Dial Peers | Dial Peers]].
Regexp is used to allow/deny CallerID/Destinations for [[M2 Origination Points | Origination Points]], [[M2 Termination Points | Termination Points]] and [[M2 Dial Peers | Dial Peers]].


{| border="1" cellpadding="5" cellspacing="0"  
{| border="1" cellpadding="2" cellspacing="0"  
| '''Regexp''' || '''Explanation'''  
| '''Regexp''' || '''Explanation'''  
|-  
|-  
Line 20: Line 20:
| ^(37[0-1])|(44)[0-9]*$|| only digits starting with 370 or 371 or 44
| ^(37[0-1])|(44)[0-9]*$|| only digits starting with 370 or 371 or 44
|-
|-
| ^(380(67|97|68|98))|(998[0-9])*$|| only digits starting with 380(67,97,68,98) and 998(0-9), where 380(67,97,68,98) = 38067,38097,38068,38098 and 998(0-9) = 9980,...,9988,9989.
| ^(380(67|97|68|98))|(998[0-9])*$ || only digits starting with 380(67,97,68,98) and 998(0-9), where 380(67,97,68,98) = 38067,38097,38068,38098 and 998(0-9) = 9980,...,9988,9989.
|-
|-
| ^(380(67|97|68|98)){17}|(998[0-9]){16}$|| only digits starting with 380(67,97,68,98) and 998(0-9), but digits number after each prefix should be exactly 12.
| ^(380(67|97|68|98)){17}|(998[0-9]){16}$ || only digits starting with 380(67,97,68,98) and 998(0-9), but digits number after each prefix should be exactly 12.
|}
|}



Revision as of 11:14, 10 March 2015

Regexp is used to allow/deny CallerID/Destinations for Origination Points, Termination Points and Dial Peers.

Regexp Explanation
.* everything
^[0-9]+$ only digits
^[0-9]{9,}$ only digits, number more than 8 digits (9, 10, 11...)
^[0-9]{0,9}$ only digits, number less than 9 digits (1, 2, 3, 4, 5, 6, 7, 8)
^\+?[0-9]+$ optional + sign and only digits
^370[0-9]+$ only digits starting with 370
^370.*$ anything starting with 370
^(37[0-1])|(44)[0-9]*$ only digits starting with 370 or 371 or 44
97|68|98))|(998[0-9])*$ only digits starting with 380(67,97,68,98) and 998(0-9), where 380(67,97,68,98) = 38067,38097,38068,38098 and 998(0-9) = 9980,...,9988,9989.
97|68|98)){17}|(998[0-9]){16}$ only digits starting with 380(67,97,68,98) and 998(0-9), but digits number after each prefix should be exactly 12.




See also