title: Use regex in pydantic model that works with set of strings
body: <p>I'm using a pydantic model to represent a request body in <code>fastapi</code>. </p>
  
  <pre><code>from pydantic import BaseModel, Schema
  
  class Files(BaseModel):
      '''Class for file URLs'''
      urls: Set[str] = Schema(..., title='Urls to files')
  </code></pre>
  
  <p>This will restrict the request body to set of urls defined as <code>str</code>.</p>
  
  <p>I was wondering if there's a way to further limit the "types" of urls sent in the body, by using e.g. regular expressions. I know <code>Schema</code> has a <code>regex</code> flags, but I think that will only work with a single input (or at least it didn't work with my lists).</p>