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);