import java.util.Scanner;
public class Demo2_27{
public static void mian(String[] args){
System.ot.println("请输入一行文本:");
Scanner sc=new Scanner(System.in);
String str=sc.nextLine();
//匹配以下字符任意多个:任意空白(空格、换行等),任意数字,标点符号
String s="{\\s\\d\\p{Punct}}+";
String [] words=str.split(s);//以s作为分割str的依据
for (int i=0;i
System.out.println("单词"+m+是:"+words[i]");
}}}