Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If phone number is 02871 2397567 and we like to let pass only last 3 digit (567) we have to “cut” 02871 2397.

 

There are sever way severl ways how can number come in, that way we have to check all possibility’s.

...

 

 

 

Prefix    

 

City prefix

 

Number 

 Comment

 

 

 

 0049

 

 2871

 

 2397   

 

 567  567

 

 

 

 

+49

 

 2871

 

 2397   

  567 

 567

 

 

 

 

 49

 

 2871

 

 2397    

  567

 567

 

 

 

 

0

 

  2871

 

 2397   

  567

 567

 

 

 

 

 

 

 2871

 

2397   

 

 567

 

 

 

 

 

 

 

 

2397

  567

 567

 

 

 

(?:

0049|\+49|49|0

)? 

 

 

   

 

 

 Will be checkt if 0049 or +49 or 49 or 0 is part of incomming number.

If yes, this part will be cut.

 

(?:

 

 

 

2871

)?

 

 

 

 Will be checkt if 2871 is part of incomming number.

If yes, this part will be cut.

^(?:

 

 

 

 

 

 

2397

)?

 

 Will be checkt if 2397 is part of incomming number.

If yes, this part will be cut.

 

 

 

 

 

 

 

 

 

(.*)

 All number those are still there will be saved in $1

^(?:

(?:

(?:

0049|\+49|49|0

)?

2871

)?

2397

)?

(.*)

Expression.

(?: ( ?: (?: 0049|\+49|49|0)?2871)? 2397 )?(.*)     In $1 will be saved 567.

 

 

 

 

 

 

 

 

 

 

 

If we what to use complete number 2397567 in “Inbound routes” that should look like this:

 

 

 

 

 

Prefix

 

City prefix

 

Number

Comment

 

 

0049

 

2871

  2397567

 2397567

 

 

 

+49

 

2871

  2397567

 2397567

 

 

 

49

 

2871

  2397567

 2397567

 

 

 

0

 

2871

  2397567

 2397567

 

 

 

 

 

2871

  2397567

 2397567

 

 

 

 

 

 

  2397567

 2397567

 

 

(?:

0049|\+49|49|0

)?

 

 

 

Will be checkt if 0049 or +49 or 49 or 0 is part of incomming number.

If yes, this part will be cut.

^(?:

 

 

 

2871

)?

 

Will be checkt if 2871 is part of incomming number.

If yes, this part will be cut.

 

 

 

 

 

 

(.*)

All number those are still there will be saved in $1

^(?:

(?:

0049|\+49|49|0

)?

2871

)?

(.*)

Expression.

                                       ( ?: (?: 0049|\+49|49|0)?2871)?(.*)                       In $1 will be saved  2397567saved  2397567.

Explanation:

(.*) – all numbers which still are there

...

(?:XXXXX)? – means if XXXXX exist this part will be “cut”.

| – ist is "or"