in reply to Selecting HL7 Transactions
assuming ~ is the segment terminator. Then, use split to break the segments into arrays. It is much easier than dealing with regexes, and takes advantage of the delimited structure of the data.$PV1segment = ($transaction =~ /PV1.+?~/;
|
---|