-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xsd regular expression support for character classes #68
Comments
RFC 7950 sec 9.4.5 references W3 XML Schema Part 2 as the standard for the regular expressions used in the pattern statement: https://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#regexs |
* added support for \c, \d, \w, \W, \s, \S
Thanks for the reference link. |
these guys have a lot of tools I've found useful: https://yangcatalog.org/ |
An rpc with an input parameter that is a string with a pattern "\w[\w_-]*" did not match the value "a-b". After stepping through with gdb, I found that regcomp() fails to compile this expression. The function regexp_xsd2posix() probably needs to replace '\w' with something that is valid in POSIX ERE.
When attempting to replace this with a regex that works with regcomp(), the pattern "[0-9A-Za-z-]" also didn't compile. Moving the '-' to the last character in the bracket expression ('[0-9A-Za-z-]') worked.
The text was updated successfully, but these errors were encountered: