Skip to content

Commit 7ce1ad4

Browse files
committed
Update regular expression for media size names.
1 parent 5256779 commit 7ce1ad4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/pwg5101.1.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# https://ftp.pwg.org/pub/pwg/candidates/cs-pwgmsn21-20230915-5101.1.pdf
55
#
6-
# Copyright © 2022-2024 by OpenPrinting.
6+
# Copyright © 2022-2025 by OpenPrinting.
77
# Copyright © 2007-2017 by Apple Inc.
88
# Copyright © 2001-2006 by Easy Software Products. All rights reserved.
99
#
@@ -20,7 +20,7 @@
2020
#
2121

2222
# Regular expression for PWG self-describing media size names (eek!)
23-
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)$$/"
23+
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,})$$/"
2424

2525

2626
# Simple test of media-xxx values...

0 commit comments

Comments
 (0)