From 03cd386f70d97d7d2699daac7376f25236f9bf9e Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Wed, 14 Mar 2018 11:47:16 +0100 Subject: [PATCH] New regexp --- modules/labelgenerate/models/generatebarcode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/labelgenerate/models/generatebarcode.php b/modules/labelgenerate/models/generatebarcode.php index daa6f696..8e117b84 100644 --- a/modules/labelgenerate/models/generatebarcode.php +++ b/modules/labelgenerate/models/generatebarcode.php @@ -371,7 +371,7 @@ class GenerateBarcode } // Mark in ref else { - preg_match('/^.*-(.*)-.*/', $product['ref'], $matches); + preg_match('/^[0-9a-zA-Z&]{1,}-([0-9]{1,})-.*/g', $product['ref'], $matches); $ref = $matches[1]; $this->_printIdMark($pdf, $ref, 1, $width, $height_label, 30); }