From: Michael R Sweet Date: Sat, 15 Nov 2025 21:50:24 +0000 (-0500) Subject: Update regular expression for testing media size names. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b65a95c054e5153b624b1caa32d58d16be564398;p=thirdparty%2Fcups.git Update regular expression for testing media size names. --- diff --git a/examples/ipp-2.0.test b/examples/ipp-2.0.test index 93b4834530..337456a8f8 100644 --- a/examples/ipp-2.0.test +++ b/examples/ipp-2.0.test @@ -1,7 +1,7 @@ # # IPP/2.0 test suite. # -# Copyright © 2020-2024 by OpenPrinting. +# Copyright © 2020-2025 by OpenPrinting. # Copyright © 2007-2017 by Apple Inc. # Copyright © 2001-2006 by Easy Software Products. All rights reserved. # @@ -20,8 +20,7 @@ INCLUDE "ipp-1.1.test" # Regular expression for PWG media size names (eek!) -DEFINE MEDIA_REGEX "/^(choice(_((custom|na|asme|roc|oe|roll)_[a-z0-9][-a-z0-9]*_([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])x([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])in|(custom|iso|jis|jpn|prc|om|roll)_[a-z0-9][-a-z0-9]*_([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])x([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])mm)){2,}|(custom|na|asme|roc|oe|roll)_[a-z0-9][-a-z0-9]*_([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])x([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])in|(custom|iso|jis|jpn|prc|om|roll)_[a-z0-9][-a-z0-9]*_([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])x([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])mm)$$/" - +DEFINE MEDIA_REGEX "/^(((custom|na|asme|roc|oe|roll)_([A-Za-z0-9][-A-Z.a-z0-9]*)_([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])x(([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])|0)in|(custom|iso|jis|jpn|prc|om|roll)_([A-Za-z0-9][-A-Z.a-z0-9]*)_([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])x(([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])|0)mm|disc_([A-Za-z0-9][-A-Z.a-z0-9]*)_([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])x([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])mm)|choice(_((custom|na|asme|roc|oe|roll)_([A-Za-z0-9][-A-Z.a-z0-9]*)_([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])x(([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])|0)in|(custom|iso|jis|jpn|prc|om|roll)_([A-Za-z0-9][-A-Z.a-z0-9]*)_([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])x(([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])|0)mm|disc_([A-Za-z0-9][-A-Z.a-z0-9]*)_([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])x([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])mm)){2,})$$/" # Test required printer description attribute support. #