import java.util.regex.*;
public class UsePatternMatcher{
public static void main(String[] args){
String phone1="Justin的手机号码:0939-100391/n"+
"momor的手机号码:0939-666888/n";
Pattern pattern=Pattern.compile(".*0939-//d{6}");
Matcher matcher=pattern.matcher(phone1);
while(matcher.find()){
System.out.println(matcher.group());
}
String phone2="caterpillar的手机号码:0952-600391/n"+
"bush的手机号码:0939-550391";
matcher=pattern.matcher(phone2);
while(matcher.find()){
System.out.println(matcher.group());
}
}
}