def key_to_pattern(self, rkey): """Get the corresponding regex for any routing key.""" return '^%s$' % ('\.'.join( self.wildcards.get(word, word) for word in escape_regex(rkey, '.#*').split('.') ))
def key_to_pattern(self, rkey): """Get the corresponding regex for any routing key.""" return '^%s$' % (r'\.'.join( self.wildcards.get(word, word) for word in escape_regex(rkey, '.#*').split('.')))
def key_to_pattern(self, rkey): """Get the corresponding regex for any routing key.""" return "^%s$" % (r"\.".join( self.wildcards.get(word, word) for word in escape_regex(rkey, ".#*").split(".")))