Hi,
I am trying to check if there is an easy way to use regex to verify if a received topic matches a wildcard subscription.
example:
subscribed: "+/room/+/light/+"
received "house1/room/bedside/light/status"
I don't have experience with Regex so I was wondering if someone can help with an example function that gets received string and subscribed string and return true if (like in this case the received matched the wildcard definition.
thanks a lot!
I am trying to check if there is an easy way to use regex to verify if a received topic matches a wildcard subscription.
example:
subscribed: "+/room/+/light/+"
received "house1/room/bedside/light/status"
I don't have experience with Regex so I was wondering if someone can help with an example function that gets received string and subscribed string and return true if (like in this case the received matched the wildcard definition.
thanks a lot!
Last edited: