After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 705087 - pattern "\d{14}|" => "regexp error : failed to compile: expecting a branch after |" in v2.9.1
pattern "\d{14}|" => "regexp error : failed to compile: expecting a branch af...
Status: RESOLVED DUPLICATE of bug 649244
Product: libxml2
Classification: Platform
Component: regexp
git master
Other All
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2013-07-29 16:34 UTC by Bruno LEGAY
Modified: 2019-09-25 12:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
contains xml and xsd sample files (1.97 KB, application/zip)
2013-07-29 16:34 UTC, Bruno LEGAY
Details

Description Bruno LEGAY 2013-07-29 16:34:02 UTC
Created attachment 250382 [details]
contains xml and xsd sample files

Hello,

I have some schema (on which I don't really have control) which contain some regex pattern which are failing to compile becuase the contain a regex pattern which looks like this "\d{14}|" (14 décimal or nothing)...

pattern value="\d{14}|()" => OK
pattern value="\d{14}|" => KO

 regexp error : failed to compile: expecting a branch after |
                .../pbPattern.xsd:39: element pattern: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}pattern': The value '\d{14}|' of the facet 'pattern' is not a valid regular expression.
                WXS schema .../pbPattern.xsd failed to compile


xmllint --version
 .../xmllint: using libxml version 20901
   compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 FTP HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude Iconv ISO8859X Unicode Regexps Automata Expr Schemas Schematron Modules Debug Zlib
Comment 1 Bruno LEGAY 2015-01-27 16:01:14 UTC
Hi,

This problem is also present on the Linux platform :

/usr/local/bin/xmllint: using libxml version 20902
   compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 FTP HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude Iconv ISO8859X Unicode Regexps Automata Expr Schemas Schematron Modules Debug 
regexp error : failed to compile: expecting a branch after |
pbPattern.xsd:36: element pattern: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}pattern': The value '\d{14}|' of the facet 'pattern' is not a valid regular expression.
WXS schema pbPattern.xsd failed to compile
Comment 2 Nick Wellnhofer 2019-09-25 12:00:12 UTC

*** This bug has been marked as a duplicate of bug 649244 ***