Skip to content

Pattern Matching single and multiple characters in {} #141

@bill-i-am-code

Description

@bill-i-am-code

When running the code below, I would expect all 4 results to be 1

OSCMessage msg1("/test/{1,16}");
OSCMessage msg2("/test/{16,1}");

int val1 = msg1.fullMatch("/1", 5);
Serial.println(val1);
int val2 = msg1.fullMatch("/16", 5);
Serial.println(val2);
int val3 = msg2.fullMatch("/1", 5);
Serial.println(val3);
int val4 = msg2.fullMatch("/16", 5);
Serial.println(val4);

But the actual output is

1
0
1
1

It is as if because the first character of /1 of /16 has already been matched, the /16 is not matched.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions