title: How to determine if a string matches a pattern type
body: <p>Given the following pattern types: where 11 and 22 are variable:</p>
  
  <pre><code>#/projects/11
  #/projects/11/tasks/22
  </code></pre>
  
  <p>With Javascript/jQuery, given var url, how can I determine if var url equals either string 1, 2 or neither?</p>
  
  <p>Thanks</p>