Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagelua
function HL7Normalize(Msg)
   local Result = Msg
   -- Get the | delimiter
   local D= Msg:sub(4,4)
   Result:gsub(D, "|")
   -- Repeat for the other 4 delimeters
   return Result
end

Solve a one off uncommon problems with a one off simple solutions - see separation of concerns.