Open ajlennon opened 5 years ago
Hi, thanks for the bug report! This library has been superseded by mqtt-pattern, so I don't think it's worth it to add bug fixes for now.. Could you try that out and see if it works correctly? The performance is a lot better since it doesn't use regex.
Hi! No worries
I need to use RegEx unfortunately for various reasons (querying a legacy SQLITE database)
I've had some tweet conversations with the guy behind MQtt fwiw and I think I have it clarified!
I think I have some workarounds...
For ref: https://twitter.com/embedded_iot/status/1065205033824862208
Cheers!
If you're planning on making a port anyways, you can ignore this line of code where I explicitly ignore the trailing slash. 😀
Hi, nice work thanks.
I've been doing some testing and the regexp generated seems to match topics with trailing slashes incorrectly e.g. changing the test case to:
The result is that both
foo/bar/baz
andfoo/bar/baz/
match against the pattern, but the second should not match (imho). I've tested this with MQtt.fx and Mosquitto and they are different subscriptions