Value INDEX (\d+)
Value EXPECTED (E)
Value SEEN_REPLY (S)
Value ASSURED (A)
Value CONFIRMED (C)
Value DYING (D)
Value FASTTRACK (F)
Value HARDWARE_OFFLOAD (H)
Value SOURCE_NAT (s)
Value DESTINATION_NAT (d)
Value PROTOCOL (\w+)
Value SOURCE_ADDRESS (\S+)
Value SOURCE_PORT (\S+)
Value DESTINATION_ADDRESS (\S+)
Value DESTINATION_PORT (\S+)
Value REPLY_SOURCE_ADDRESS (\S+)
Value REPLY_SOURCE_PORT (\S+)
Value REPLY_DESTINATION_ADDRESS (\S+)
Value REPLY_DESTINATION_PORT (\S+)
Value TCP_STATE (\S+)
Value ICMP_TYPE (\d+)
Value ICMP_CODE (\d+)
Value ICMP_ID (\d+)
Value TIMEOUT (\S+)
Value ORIGIN_PACKETS (\d.+\d|\d+)
Value ORIGIN_BYTES (\d.+\d|\d+)
Value ORIGIN_FASTTRACK_PACKETS (\d.+\d|\d+)
Value ORIGIN_FASTTRACK_BYTES (\d.+\d|\d+)
Value REPLY_PACKETS (\d.+\d|\d+)
Value REPLY_BYTES (\d.+\d|\d+)
Value REPLY_FASTTRACK_PACKETS (\d.+\d|\d+)
Value REPLY_FASTTRACK_BYTES (\d.+\d|\d+)
Value ORIGIN_RATE (\S+)
Value REPLY_RATE (\S+)

Start
  # Copy flags for new lines: ${EXPECTED}\s*${SEEN_REPLY}\s*${ASSURED}\s*${CONFIRMED}\s*${DYING}\s*${FASTTRACK}\s*${HARDWARE_OFFLOAD}\s*${SOURCE_NAT}\s*${DESTINATION_NAT}
  ^\s*${INDEX}\s*${EXPECTED}?\s*${SEEN_REPLY}?\s*${ASSURED}?\s*${CONFIRMED}?\s*${DYING}?\s*${FASTTRACK}?\s*${HARDWARE_OFFLOAD}?\s*${SOURCE_NAT}?\s*${DESTINATION_NAT}?\s*protocol=${PROTOCOL}\s*src-address=${SOURCE_ADDRESS}\s*src-port=${SOURCE_PORT}\s*dst-address=${DESTINATION_ADDRESS}\s*dst-port=${DESTINATION_PORT}\s*reply-src-address=${REPLY_SOURCE_ADDRESS}\s*reply-src-port=${REPLY_SOURCE_PORT}\s*reply-dst-address=${REPLY_DESTINATION_ADDRESS}\s*reply-dst-port=${REPLY_DESTINATION_PORT}\s*tcp-state=${TCP_STATE}\s*timeout=${TIMEOUT}\s*orig-packets=${ORIGIN_PACKETS}\s*orig-bytes=${ORIGIN_BYTES}\s*orig-fasttrack-packets=${ORIGIN_FASTTRACK_PACKETS}\s*orig-fasttrack-bytes=${ORIGIN_FASTTRACK_BYTES}\s*repl-packets=${REPLY_PACKETS}\s*repl-bytes=${REPLY_BYTES}\s*repl-fasttrack-packets=${REPLY_FASTTRACK_PACKETS}\s*repl-fasttrack-bytes=${REPLY_FASTTRACK_BYTES}\s*orig-rate=${ORIGIN_RATE}\s*repl-rate=${REPLY_RATE}\s*$$ -> Record
  ^\s*${INDEX}\s*${EXPECTED}?\s*${SEEN_REPLY}?\s*${ASSURED}?\s*${CONFIRMED}?\s*${DYING}?\s*${FASTTRACK}?\s*${HARDWARE_OFFLOAD}?\s*${SOURCE_NAT}?\s*${DESTINATION_NAT}?\s*protocol=${PROTOCOL}\s*src-address=${SOURCE_ADDRESS}\s*dst-address=${DESTINATION_ADDRESS}\s*reply-src-address=${REPLY_SOURCE_ADDRESS}\s*reply-dst-address=${REPLY_DESTINATION_ADDRESS}\s*icmp-type=${ICMP_TYPE}\s*icmp-code=${ICMP_CODE}\s*icmp-id=${ICMP_ID}\s*timeout=${TIMEOUT}\s*orig-packets=${ORIGIN_PACKETS}\s*orig-bytes=${ORIGIN_BYTES}\s*orig-fasttrack-packets=${ORIGIN_FASTTRACK_PACKETS}\s*orig-fasttrack-bytes=${ORIGIN_FASTTRACK_BYTES}\s*repl-packets=${REPLY_PACKETS}\s*repl-bytes=${REPLY_BYTES}\s*repl-fasttrack-packets=${REPLY_FASTTRACK_PACKETS}\s*repl-fasttrack-bytes=${REPLY_FASTTRACK_BYTES}\s*orig-rate=${ORIGIN_RATE}\s*repl-rate=${REPLY_RATE}\s*$$ -> Record
  ^. -> Error