title: Validations using regular Expressions
body: <p>Can someone point me on using Regular Expressions in android (Patterns and Matchers to be specific)</p>
  
  <pre><code>String pass_pattern  = "^([A-Za-z0-9][A-Za-z0-9]{4,10})$";
  b1= (Button)findViewById(R.id.button1);
      et1= (EditText)findViewById(R.id.editText1);
  
      b1.setOnClickListener(new OnClickListener() {
  
          @Override
          public void onClick(View arg0) {    
              chek = et1.getText().toString();
              if(chek.equals(""))
              {
              Toast.makeText(getApplicationContext(), "Enter password",1000).show();
              }
  
              if(chek.matches(pass_pattern)) 
              {
                  Toast.makeText(getApplicationContext(), "Valid pAssword",1000).show();
              }else {Toast.makeText(getApplicationContext(), "InvalidpAssword",1000).show();}
  
          }
      });
  </code></pre>
  
  <p>this is my code currently, i wanna check if the user has entered atleast one small letter and atleast one capital letter and a number and the length should be 4-10 char's.</p>
  
  <p>If i do this via .matches() it only compares only one of the condition in the above said string.</p>