From 29c80cb417d5a365ab193ed582310ff36c92ad5b Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 15 Nov 2019 11:49:21 -0700 Subject: [PATCH] Update functions.php --- resources/functions.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/resources/functions.php b/resources/functions.php index 7368db8023..70d8a10dc1 100644 --- a/resources/functions.php +++ b/resources/functions.php @@ -1656,7 +1656,12 @@ function number_pad($number,$n) { } //add prefix if (strlen($prefix) > 0) { - $prefix = $prefix.'?'; + if (strlen($prefix) == 1) { + $prefix = $prefix.'?'; + } + else { + $prefix = '(?:'.$prefix.')?'; + } } //convert N,X,Z syntax to regex $string = str_ireplace("N", "[2-9]", $string);