Topic Naming Validation via Regex
Hi Solace Community,
I wonder if anyone else before had the need to validate topic names (including wildcards), for example in CI/CD pipelines.
Because I couldn't find anything, I've tried myself to assemble a regex that validates the general structure of topic names. By no means I feel like it's perfect, however at least it matches my few examples.
In this case I assume that topic parts should only contain small characters plus numbers and "_" or "-"
^(?:(?:[a-z0-9_-]+|[a-z0-9_-]+\*|\*)\/)*([a-z0-9_-]+|[a-z0-9_-]+\*|\*|>)$ # MATCH my/simple/topic/123 my/simple/topic/123/> my/simple/topic/123/* my/simple/to*/123/* my/simple/topic/*/*/> */simple/topic/> my * > # NO MATCH my/*imple/topic my/simple/topic/ my/simple/topic/>/123
I'd really like to get your feedback if you have something better in place :-)
Maybe there's even something officially available?