Open MiloDC opened 3 years ago
in re.c there is this written
/*
* '[abc]' Character class, match if one of {'a', 'b', 'c'}
* '[^abc]' Inverted class, match if NOT one of {'a', 'b', 'c'} -- NOTE: feature is currently broken!
*/
I see you use inverted class, but i don't realized test if you are right
re_t myRe = re_compile("^[^=]+=[^=]+$");
int matchLen;
re_matchp(myRe, "operationName=PublishEditMessageClients", &matchLen);
(= > -1)re_matchp(myRe, "operationName=DeleteMessageClients", &matchLen);
(= < 0)re_matchp(myRe, "operationName=PublishEditMessageClients", &matchLen);
(= > -1)re_matchp(myRe, "operationName=PublishDirectMessageClients", &matchLen);
(= < 0)As you can see, only the first string matched against the pattern yields a successful match. Any other string thereafter yields failure. Why is this?