Regular Expression in android for password without spaces
<p>I have a EditText field in android. The password should contain minimum 4 characters and maximum 20 characters without spaces at the start or in the middle. Example blankspaceRaghu and RaghublankspaceRaghu should not be alllowed.</p>

<pre><code>Pass= password.getText().toString();    

Pattern p= Pattern.compile("[^\\S]+[a-z,A-Z]+");

Matcher m = p.matcher(Pass);
</code></pre>
