当存在相同的重复关键字时,是否可以或允许格式化EDIFACT / BAYPLIE文件? *( RFF + BM:1' EQD + CN + )在编辑器(Notepad ++或UltraEdit)中打开并转换/格式化每个单独的新行?
来自3个容器的编辑器提取样本如下:
RFF + BM: 1'EQD + CN +GESU6445322 45G0 + ++ 0 + + 5'NAD CA + EMC: 172: 147 20'LOC + + 0,781,584 + 5'MEA :: WT ++ KGM: 13400'LOC + 9 + + 11 + CNNBO'LOC DEHBG 'RFF + BM: 1'EQD + CN +ZCSU8245400 45G0 + ++ 0 + + CA + 5'NAD ZIM 172: 147 20'LOC + + 0,781,586 + 5'MEA :: WT ++ KGM: 12300'LOC + 9 + + 11 + CNNBO'LOC DEHBG 'RFF + BM: 1'EQD + CN +TCNU8547134 45G0 + ++ 0 + + CA + 5'NAD ZIM 172: 147 20'LOC + + 0,781,588 + 5'MEA :: WT ++ KGM: 07900'LOC + 9 + + 11 + CNNBO'LOC DEHBG 'RFF + BM: 1'EQD + CN + ...
在转换后的最终结果中,可以更直观的方式显示并开始
RFF + BM: 1'EQD + CN +GESU6445322 45G0 + ++ 0 + + 5'NAD CA + EMC: 172: 147 20'LOC + + 0,781,584 + 5'MEA :: WT ++ KGM: 13400'LOC + 9 + + 11 + CNNBO'LOC DEHBG '
RFF + BM: 1'EQD + CN +ZCSU8245400 45G0 + ++ 0 + + CA + 5'NAD ZIM 172: 147 20'LOC + + 0,781,586 + 5'MEA :: WT ++ KGM: 12300'LOC + 9 + + 11 + CNNBO'LOC DEHBG '
RFF + BM: 1'EQD + CN +TCNU8547134 45G0 + ++ 0 + + CA + 5'NAD ZIM 172: 147 20'LOC + + 0,781,588 + 5'MEA :: WT ++ KGM: 07900'LOC + 9 + + 11 + CNNBO'LOC DEHBG 'RFF + BM: 1'EQD + CN +
如何在Notepad ++或Ultraedit编辑器中制作?
答案 0 :(得分:1)
(?<=.)\bRFF \+ BM: 1'EQD \+ CN \+
\n$0
. matches newline
<强>解释强>
(?<=.) : Look behind, make sure we ahave a character before
\b : word boundary, to not match xxxRFM
RFF \+ BM: 1'EQD \+ CN \+ : literally (+ have to be escaped as it is a special character)
<强>替换强>
\n : linebreak, you could use "\r\n"
$0 : content of group 0 (ie the whole match)
给定示例的结果:
RFF + BM: 1'EQD + CN +GESU6445322 45G0 + ++ 0 + + 5'NAD CA + EMC: 172: 147 20'LOC + + 0,781,584 + 5'MEA :: WT ++ KGM: 13400'LOC + 9 + + 11 + CNNBO'LOC DEHBG '
RFF + BM: 1'EQD + CN +ZCSU8245400 45G0 + ++ 0 + + CA + 5'NAD ZIM 172: 147 20'LOC + + 0,781,586 + 5'MEA :: WT ++ KGM: 12300'LOC + 9 + + 11 + CNNBO'LOC DEHBG '
RFF + BM: 1'EQD + CN +TCNU8547134 45G0 + ++ 0 + + CA + 5'NAD ZIM 172: 147 20'LOC + + 0,781,588 + 5'MEA :: WT ++ KGM: 07900'LOC + 9 + + 11 + CNNBO'LOC DEHBG '
RFF + BM: 1'EQD + CN + ...