'Adds a target regexp for dispatching'

def add_re(self, regex, obj, priority=0):

    chain = self.regexs.get(regex, CommandChainDispatcher())
    chain.add(obj, priority)
    self.regexs[regex] = chain
