import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Test3 {
public static void main(String[] args) {
String str = "1229六城投84-09-六安城市建设投资有限公司";
String temp = "";
String regex = "\\w";
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(str);
while (matcher.find()) {
temp = temp+matcher.group();
System.out.println(temp);
}
}
}