如何从
中获取|ADT^A05|
"MSH|^~\&|PHTADT09|ABC|DADIST00|ABC|20120425152829|rcalini1|ADT^A05|20429208851634|P|2.1|560"
我试过了,但是不行
"|([A-Z]{3})^([A-Z]{1})([0-9]{2})|"
最佳答案
当有像 |
这样的分隔符时,我认为你不需要正则表达式
var adt = text.Split('|')[8];
参见HL7的定义格式
Each segment in a message is divided into composites, or fields, and the fields are separated by pipe characters ('|')
关于c# - 正则表达式匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13849067/