Skip to content
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

Pattern Matching single and multiple characters in {} #141

Open
bill-i-am-code opened this issue Oct 1, 2023 · 0 comments
Open

Pattern Matching single and multiple characters in {} #141

bill-i-am-code opened this issue Oct 1, 2023 · 0 comments

Comments

@bill-i-am-code
Copy link

bill-i-am-code commented Oct 1, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant