Android Studio Regular Expression
<p><strong>I have this:</strong></p>

<pre><code> public final static boolean isValidNickName(String target)
 {
     return Pattern.compile("^.((?=.*[가-힣]).{1,12})((?=.*[a-zA-Z0-9]){2,12}).$").matcher(target).matches();
 }
</code></pre>

<p>and I would like the pattern to validate the followings:</p>

<ol>
<li><p>Allow one letter or more from the range [가-힣].</p></li>
<li><p>Allow alphanumeric variation starting from 2 combinations ex)1a, 가1, 가a, 5bcc, 994930s0  are allowed</p></li>
<li><p>Exclude everythingelse (like special characters or a single alphanumeric character)</p></li>
</ol>

<p>The application exits when I run this for now.</p>

<p>Also, I have this which is working:</p>

<pre><code>    public final static boolean isValidPassword(String target) 
   {
        return Pattern.compile("(?=.*[a-zA-Z])(?=.*[0-9]).{4,12}").matcher(target).matches();
   }
</code></pre>

<p>But this returns true when special characters are included</p>

<p>and I want it to return false when special characters are included</p>