import java.util.Scanner;
public class StringTest {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
while(true) {
System.out.println("请输入任意字符串进行判断:");
String str=sc.nextLine();
if(!str.matches("[\\da-zA-Z]+"))
System.out.println("错误");
else
System.out.println("正确");
}
}
}