String reg = ".*末位(.*)的訂單.*支付金額為([^元]*)元.*驗證碼(\\d+),([\\d:]+)發.*";
String a = str.replaceAll(reg,"$1");
String b = str.replaceAll(reg,"$2");
String c = str.replaceAll(reg,"$3");
String d = str.replaceAll(reg,"$4");