Skip to content

re_matchp succeeds only for the first string compared to a pattern #71

Open
@MiloDC

Description

@MiloDC

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions