Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
$number = "5551231234";
$number =~ s/\D//g; # for good measure
$rev_number = join('', reverse ( split(//, $number) ) );
$rev_number =~ /(....)(...)(...)?(.)?/;
unshift @nums, join('',reverse (split(//, $_))) for($1,$2,$3,$4);
print "$nums[0] ($nums[1]) $nums[2]-$nums[3]";
$number =~ /
[[:blank:].:+\-]*? # seperators
(\(?(?i:fax|phone)?\)?) # type of number
[[:blank:].:+\-]*? # seperators
((?:\(?\d{1,2}\)?)?) # country code
[[:blank:].:+\-]*? # seperators
( # area code
(?:
[[:blank:].:+\-()]*? # separators
\d # number
[[:blank:].:+\-()]*? # separators
){3} # three times
)
( # prefix
(?:
[[:blank:].:+\-()]*? # separators
\d # number
[[:blank:].:+\-()]*? # separators
){3} # three times
)
( # line number
(?:
[[:blank:].:+\-()]*? # separators
\d # number
[[:blank:].:+\-()]*? # separators
){4} # three times
)
(?i: # extension
[[:blank:].:+\-]*?
(?:x|ext)
[[:blank:].:+\-]*?
(\d+?(?!\d))
)?
\s*?
/xi;
print "$1: " if $1; # print the type if it exists
print "$2 " if $2; # print the country code if it exists
print "($3)$4-$5"; # print the number
print " x$6" if $6; # print the extension if it exists