title: Symfony2 access_control, Match all routes containing some word
body: <p>The following only matches a path that starts with <code>private</code>:</p>
  
  
  
  <pre class="lang-php prettyprint-override"><code>access_control:
      #...
      - { path: ^/private, roles: IS_AUTHENTICATED_ANONYMOUSLY, ip: 127.0.0.1 }
      - { path: ^/private, roles: ROLE_NO_ACCESS }
  </code></pre>
  
  <p>How can I match all the routes that contain <code>/private/</code> (and do not necessarily start with <code>private</code>)? For example, something that will match <code>/message/private/blabla</code>..
  the equivalent of <code>[path~="private"]</code> with <a href="http://api.jquery.com/category/selectors/" rel="nofollow">jQuery selectors</a>.</p>
  
  <p><em><strong>Note:</em></strong> Does anyone know how we call the regex we are using here? Is this specific to yml or is this implemented by Symfony, I am confused. 
  Is there a chance I missed this in the doc somewhere, I mean the description with the specific matching patterns like start with, end with, contains etc....</p>