Partial Match not working
<p>I have three Strings a,b,c below and I am trying to get String exp to have a partial match with String b, but every time I run the code I get no match.  </p>

<pre><code>  String a = "ID = '5' &amp;&amp; name='abc' || level='5'";
  String b = "ID = '6' &amp;&amp; name='def' || level='6' &amp;&amp; year='2012'";
  String exp = "ID = '6' &amp;&amp; name='def' || level='6'";
</code></pre>

<p>My Code:</p>

<pre><code>  Pattern p = Pattern.compile(b);
  Matcher m = p.matcher(exp);
  if(m.matches()){
        System.out.println("Perfect Match");
  }
  else if(m.hitEnd()){
        System.out.println("Partial Match");
  }
  else{
        System.out.println("No Match");
  }
</code></pre>

<p>Even when I remove &amp;&amp; year='2012', it gives me no match.</p>
