Jump to content

Delete digits


vasan

Recommended Posts

Hello

 

When we dail a 6 digit number I want to delete 3 digits and send the remainig 3 digits to different trunks.

 

E.g 501110 delete 501 and send 110 to trunk1

501111 delete 501 and send 111 to trunk1

 

501112 delete 501 and send 112 to trunk2

501113 delete 501 and send 113 to trunk2

 

501123 delete 501 and send 123 to trunk3

 

 

 

Is this ok for trunk1

Pattern 50111([0-1])* Replacement 11*

and repeat similarly for the rest of the trunks or there is a better way to do it.

 

Thanks

Link to comment
Share on other sites

When we dail a 6 digit number I want to delete 3 digits and send the remainig 3 digits to different trunks.

 

E.g 501110 delete 501 and send 110 to trunk1

501111 delete 501 and send 111 to trunk1

501112 delete 501 and send 112 to trunk2

501113 delete 501 and send 113 to trunk2

501123 delete 501 and send 123 to trunk3

 

Is this ok for trunk1

Pattern 50111([0-1])* Replacement 11*

and repeat similarly for the rest of the trunks or there is a better way to do it.

 

I would use pattern 501xxx and no replacement. Or use 501([0-9]{3}), no replacement.

Link to comment
Share on other sites

If I use 501xxx all 501xxx calls will be routed to say trunk1

 

How to diffrentiate 501110 and 501111 to trunk 1

501112 and 501113 to trunk 2

thanks

 

You can still use ERE. For example 501([0-9]{2}[01]) will match 501xx0 and 501xx1 (and return the last three digits). ERE are very flexible, though not so easy to read.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...