Details
-
Bug
-
Status: Resolved
-
Resolution: Duplicate
-
None
-
None
-
None
-
None
-
Operating System: All
Platform: All
-
6630
Description
Pattern statement (RFC 6020, Section 9.4.6) accepts regular expression defined by XSD Schema Spec (https://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#regexs) which doesn't have meta-characters like ^ and $.
XSD Schema definition of RegExp expects to match the entire string and so Yangtools is correctly returning the pattern defined in Yang enclosed within ^ and $. But, it doesn't escape these characters if they are found inside the pattern value.
Due to this issue, attempts to use PatternConstraint::getRegularExpression as is with Java Pattern/Matcher classes doesn't work as expected.
Attachments
Issue Links
- duplicates
-
YANGTOOLS-587 Parser: XSD regular expressions are interpreted as Java regexes
- Resolved
- is blocked by
-
YANGTOOLS-587 Parser: XSD regular expressions are interpreted as Java regexes
- Resolved