Comparing values in two strings
<p>I'm trying to compare two strings with one another. One contains for example :</p>

<pre><code>String x =" aa bb cc dd ee " 
</code></pre>

<p>and the other one :</p>

<pre><code>String y =" aa bb "
</code></pre>

<p>Now I want to do this </p>

<pre><code>if (any values from String x EXISTS IN String y) 

if (y.matches(???)){System.out.println("true");}
else{System.out.println("false");}
</code></pre>

<p>I know that I can to do the opposite by using regex, like this :</p>

<pre><code>if (x.matches(".*"+y+".*")){do something}
</code></pre>

<p>But I'd like to know if there is any way to check if any value in String x matches String y.</p>
