Versions Compared

Key

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

...

div
classpdf8pttext

The following table illustrates use of Regular Expressions for matching phone number patterns and phone number transformations:

Rule Name

Description

Input Pattern

Output Pattern

Result

4-digit Extension

Transforms 4-digit extensions

Code Block
none
none
(\d{4})
Code Block
none
none
+1425555\1

1234 is transformed to +14255551234

5-digit Extension

Transforms 5-digit extensions

Code Block
none
none
8(\d{4})
Code Block
none
none
+1425558\1

81234 is transformed to +14255581234

7-digit calling Fremont

Transforms 7-digit numbers to Fremont local number

Code Block
none
none
(\d{7})
Code Block
none
none
+1510\1

5551212 is transformed to +15105551212

7-digit calling Dallas

Transforms 7-digit numbers to Dallas local number

Code Block
none
none
(\d{7})
Code Block
none
none
+1972\1

5551212 is transformed to +19725551212

10-digit calling US

Transforms 10-digit numbers in US

Code Block
none
none
(\d{10})
Code Block
none
none
+1\1

5105551212 is transformed to +1206555121215105551212

Long Distance (LD) Calling US

Transforms numbers with LD prefix in US

Code Block
none
none
1(\d{10})
Code Block
none
none
+1\1

12145551212 is transformed to +12145551212

International Calling

Transforms numbers with US international prefix

Code Block
none
none
011(\d*)
Code Block
none
none
+\1

011914412345678 is transformed to +914412345678

Fremont Operator

Transforms 0 to Fremont Operator

Code Block
none
none
0
Code Block
none
none
+15105551212

0 is transformed to +15105551212

Fremont Site Prefix

Transforms numbers with on-net prefix (6) and Fremont site code (222)

Code Block
none
none
6222(\d{4})
Code Block
none
none
+1510555\1

62221234 is transformed to +15105551234

New York Site Prefix

Transforms numbers with on-net prefix (6) and New York site code (333)

Code Block
none
none
6333(\d{4})
Code Block
none
none
+1202555\1

63331234 is transformed to +12025551234

Dallas Site Prefix

Transforms numbers with on-net prefix (6) and Dallas site code (444)

Code Block
none
none
6444(\d{4})
Code Block
none
none
+1972555\1

64441234 is transformed to +19725551234

URI to E.164 format

Transforms URI with on-net prefix (+999) to E.164 format

Code Block
none
none
\+999(.*)@.*
Code Block
none
none
0119144\1

+99912345678@net.com is transformed to 011914412345678

...