RangerMauve / mqtt-regex

Converts an MQTT topic with parameters into a regular expression.
MIT License
20 stars 1 forks source link

# can only be at the end of a topic #1

Closed ralight closed 10 years ago

ralight commented 10 years ago

device/#/status/+ is invalid because the # wildcard can only be the last element in a topic.

RangerMauve commented 10 years ago

Ah! Good catch, I'll make sure to fix that later today. For future reference to anyone else here is where the wildcard format is described.

RangerMauve commented 10 years ago

Took a while for me to get to it, but it should be working properly now. An error is thrown if a pattern is passed which has the # wildcard anywhere but end.