[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Patterns
- From: Tristan Kohl <tristankohl@...>
- Date: Wed, 14 Dec 2022 21:53:55 +0100
I am implementing a module that mimics a MQTT broker. For this I am
transforming topics passed to the register function so I can run
string.match() on incoming messages.
Right now I am stuck how to correctly handle the multilevel wildcard:
Suppose the topic filter "/sport/#" and these published message topics:
Only the first three are allowed to match, so "/sport.*" is not an
option as that would match the forth one as well. On the other hand
"/sport/.*" would not match the first one.