Commit 2ebeefb6 by chengzhuoshen

修复mx_to_mt53A函数

parent 98e670b3
...@@ -985,14 +985,16 @@ public abstract class AbstractMx2MtTagsGenerate implements Mx2MtTagsGenerate { ...@@ -985,14 +985,16 @@ public abstract class AbstractMx2MtTagsGenerate implements Mx2MtTagsGenerate {
} }
} }
} }
String regex = ".*/FIN53/(.*)/[A-Z0-9]{1,8}/.*"; String regex = "(/[A-Z0-9]{0,8}/[0-9a-zA-Z\\-\\?:\\(\\)\\.,'\\+]*)";
Pattern p = Pattern.compile(regex); Pattern p = Pattern.compile(regex);
Matcher m = p.matcher(mtInstruction); Matcher m = p.matcher(mtInstruction);
if (m.find()) { while (m.find()) {
/** /**
* group(0)就是指的整个串,group(1)指的是第一个括号里的东西,group(2)指的第二个括号里的东西 * group(0)就是指的整个串,group(1)指的是第一个括号里的东西,group(2)指的第二个括号里的东西
*/ */
bicCode = m.group(1); if (m.group(1).startsWith("/FIN53/")) {
bicCode = m.group(1).substring(7);
}
} }
} }
if (StringUtil.isNotEmpty(bicCode) && SwiftTransferUtil.isBIC(bicCode)) { if (StringUtil.isNotEmpty(bicCode) && SwiftTransferUtil.isBIC(bicCode)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment