Java 正则表达式 截取字符串

2018-08-22  本文已影响0人  泛空秋慕

1. 2018-08-20 从异常信息中截取失败的原因

### Cause: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "pk_c_alipay_original_data"
  详细:Key (batch_no, order_id, payment_model)=(20180819043, APK9275585443, 交易退款) already exists.
; SQL []; ERROR: duplicate key value violates unique constraint "pk_c_alipay_original_data"
  详细:Key (batch_no, order_id, payment_model)=(20180819043, APK9275585443, 交易退款) already exists.; nested exception is org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "pk_c_alipay_original_data"
  详细:Key (batch_no, order_id, payment_model)=(20180819043, APK9275585443, 交易退款) already exists.
 String regexp = "\\(batch_no, order_id, payment_model\\)=\\(.*\\)";
 Pattern pattern = Pattern.compile(regexp);
 Matcher matcher = pattern.matcher(msg);
 if (matcher.find()) {
    System.out.println(matcher.group(0));
 }
上一篇 下一篇

猜你喜欢

热点阅读