Thank you Paul,for your quick reply ,
This is my code..
String Charmatch = "^[a-zA-Z]"; //dont know whether this is correct.
if( !(lname.matches(Charmatch))){
-----
}//
The requirement is, a text box which should allow only characters,anything else should throw error.
what I need is ,a regular expression which matches the requirement.