from werkzeug.routing import BaseConverter

# Courtesy of Philip Southam (http://philipsoutham.com/)
# http://stackoverflow.com/questions/5870188/does-flask-support-regular-expressions-in-its-url-routing
class RegexConverter(BaseConverter):
    def __init__(self, url_map, *items):
        super(RegexConverter, self).__init__(url_map)
        self.regex = items[0]