You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi olof:
Yang regular char \w not include underline char. The transform of \w from XSD regex to posix ERE in regexp_xsd2posix maybe wrong. \w was translate to [^[:punct:][:space:][:cntrl:]], but char _ was excluded.
\w should be [[:alnum:]|_] and \W should be [^[[:alnum:]|_]], here is the diff:
diff --git a/lib/src/clixon_regex.c b/lib/src/clixon_regex.c
index 0c47dabc..9e25d56b 100644
--- a/lib/src/clixon_regex.c
+++ b/lib/src/clixon_regex.c
@@ -181,10 +181,10 @@ regexp_xsd2posix(char *xsd,
break;
case 'w': /* word */
//cprintf(cb, "[0-9a-zA-Z_\\\\-]")
- cprintf(cb, "[^[:punct:][:space:][:cntrl:]]");
+ cprintf(cb, "[[:alnum:]|_]");
break;
case 'W': /* inverse of \w */
- cprintf(cb, "[[:punct:][:space:][:cntrl:]]");
+ cprintf(cb, "[^[[:alnum:]|_]]");
break;
default:
cprintf(cb, "\\%c", x);
The text was updated successfully, but these errors were encountered:
Hi olof:
Yang regular char \w not include underline char. The transform of \w from XSD regex to posix ERE in regexp_xsd2posix maybe wrong. \w was translate to [^[:punct:][:space:][:cntrl:]], but char _ was excluded.
\w should be [[:alnum:]|_] and \W should be [^[[:alnum:]|_]], here is the diff:
The text was updated successfully, but these errors were encountered: