title: Url pattern regex in django
body: <p>This is a a basic question but I'm having trouble finding the answer in in docs:</p>
  
  <p>Lets say I have a url like:</p>
  
  <pre><code>http://example.com/part1/part2
  </code></pre>
  
  <p>and I have:</p>
  
  <pre><code>urlpatterns = patterns('',
      # Examples:
      url(r'^$', 'xxx', name='yyy'),
  
  )
  </code></pre>
  
  <p>What part of the url string above is attempted to be matched by the regex between <code>^</code> and <code>$</code>?</p>
  
  <p>I've read through numerous sources and docs including:</p>
  
  <ul>
  <li><a href="https://docs.djangoproject.com/en/1.6/intro/tutorial03/" rel="nofollow">https://docs.djangoproject.com/en/1.6/intro/tutorial03/</a></li>
  <li><a href="https://docs.djangoproject.com/en/1.6/ref/urlresolvers/#module-django.core.urlresolvers" rel="nofollow">https://docs.djangoproject.com/en/1.6/ref/urlresolvers/#module-django.core.urlresolvers</a></li>
  <li><a href="http://www.djangobook.com/en/2.0/chapter03.html" rel="nofollow">http://www.djangobook.com/en/2.0/chapter03.html</a> .</li>
  </ul>