Translation rules and profiles

Posted: June 10, 2006 by sankar in Gateways, IOS Gateways

voice translation-rule 1

rule 1 /123/ /456/

rule 2 /^123/ /456/

rule 3 /^123$/ /456/

rule 4 /.*/ /456/

rule 5 /^123*/ /456/

rule 6 /^123+/ /456/

rule 7 /^123?/ /456/

rule 8 /^$/ /456/

a. rule 1 is a one to one replacement of any occurence of 123 in the source number with 456.

b. rule 2 replaces any number starting with 123 with a 456.

c. rule 3 replaces only the number 123 as the source number with 456.

d. rule 4 any number with the number 456, including null.

e. rule 5 says any number that starts with 12 and has 0 or more occurence of 3 with 456.

f. rule 6 says any number that starts with 12 and has 1 or more occurence of 3 with 456

g. rule 7 says any number that starts with 12 and has 0 or 1 occurence of 3 with 456.

h. rule 8 says any number with no input digits (empty ani for example) with 456.

Misc items:

A . (dot) means a single digit.

B. [0-9] specifies a range

C. .* means any digit followed by zero or more occurence, virtually any digit including null

D. .+ means any digit followed by one or more occurence, virtually any digit excluding null

E. ^$ means no digits.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s