I'm sure there are 100 better ways to do it, but this workd lol
String s = "0201 530821";
if ( s.length() != s.replaceAll( " ", "" ).length() )
{
System.out.println( "you've got spaces" );
}
If you want to strip out the spaces, having found you have some then
someting like this, (code from java tutorial somewhere but I do not rememebr where)
String onlynums = new String();
for (int i = 0; i < mystring.length(); i++){
if (mystring.charAt(i) <='9' && mystring.charAt(i) >='0') {
onlynums += mystring.substring(i, i+1);
}
}