in reply to Selecting HL7 Transactions
I would suggest using regexes only to pull individual segments out of the transaction string.
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.+?~/;
|
---|
In Section
Seekers of Perl Wisdom