Skip to content

Commit

Permalink
Replace all kind of dashes
Browse files Browse the repository at this point in the history
  • Loading branch information
ackspony authored Mar 9, 2020
1 parent c63e2e6 commit 65fdc24
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/flat/data/phone.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ public function data_ready() {
} else {
return;
}

/*
* https://stackoverflow.com/questions/18234545/replace-all-kind-of-dashes
*/
$phoneNumber = preg_replace('#\p{Pd}#u', '-', $phoneNumber);

$ext=null;
if (false !==($extp = strpos(strtolower($phoneNumber),'ext'))) {
Expand Down Expand Up @@ -350,4 +355,4 @@ public function data_ready() {
}

}
}
}

0 comments on commit 65fdc24

Please sign in to comment.