title: How can I match the start and end in Python's regex?
body: <p>I have a string and I want to match something at the start <em>and</em> end with a single search pattern. How can this be done? </p>
  
  <p>Let's say we have a string like:</p>
  
  <pre><code> string = "ftp://www.somewhere.com/over/the/rainbow/image.jpg"
  </code></pre>
  
  <p>I want to do something like this:</p>
  
  <pre><code> re.search("^ftp:// &amp; .jpg$" ,string)
  </code></pre>
  
  <p>Obviously, it's incorrect, but I hope it gets my point across. Is this possible?</p>