// I need to transfer
cloudAuxiliaryBusinessService.updateMobile("13363677377", "18032749668");
// to 13363677377 18032749668
public class POC {
public static void main(String[] args) throws IOException{
BufferedReader reader = new BufferedReader(new FileReader("C:\\Users\\l1s0n\\Desktop\\mobile.txt"));
String line = null;
while((line = reader.readLine()) != null){
Pattern p = Pattern.compile(".*?(\\d+).*?(\\d+).*"); // greed, ahh, dot represent everything
Matcher matcher = p.matcher(line);
if(matcher.matches()) // need to execute matches() explicit, see it's doc
System.out.println(matcher.group(1) + " " + matcher.group(2));
}
}
}
JavaScript: /^\/|:|\?|\.js$/ #这个会匹配已/打头、包含:、包含?、已.js结尾的字符串