title: Regular expression in flask urls
body: <p>I want to write some urls in flask using regular expression. I have them in django like this</p>
  
  <pre><code>r'^v1/$'
  r'^v1/(.+/)$'
  </code></pre>
  
  <p>I want to recreate them in flask</p>
  
  <p>I have tried following </p>
  
  <pre><code>class RegexConverter(BaseConverter):
      def __init__(self, url_map, *items):
          super(RegexConverter, self).__init__(url_map)
          self.regex = items[0]
  app.url_map.converters['regex'] = RegexConverter
  
  api.add_resource(Handler1,'/&lt;regex("^v1/$")&gt;')
  api.add_resource(Handler2,'/&lt;regex("^v1/(.+/)$")&gt;')
  </code></pre>
  
  <p>But it's not working.
  Showing error </p>
  
  <pre><code>ValueError: malformed url rule: '/&lt;regex("^v1/$")&gt;'
  </code></pre>