Value Key GEM_PORT (\d+)
Value T_CONT_ID (\d+)
Value SERVICE_TYPE (\S+)
Value ENCRYPT (\S+)
Value UPSTREAM_PQ (\S+)
Value DOWNSTREAM_PQ (\S+)
Value TRAFFIC_TABLE_INDEX (\S+)

Start
  ^\s*GEM\s*port\s*T-CONT\s*Service\s*Encrypt\s*Up\s*Down\s*Traffic\s*
  ^\s*ID\s*ID\s*type\s*PQ\s*PQ\s*table\s*index
  ^\s+${GEM_PORT}\s+${T_CONT_ID}\s+${SERVICE_TYPE}\s+${ENCRYPT}\s+(-|${UPSTREAM_PQ})\s+(-|${DOWNSTREAM_PQ})\s+(-|${TRAFFIC_TABLE_INDEX}) -> Record
  ^\s*The\s*number\s*of\s*GEM\s*ports\s*is:\s*\d+
  ^\s*(\S/)+\S:\s+(\d/)+\d\s+ONT\s+ID:\s+\d
  ^\s*-+\s*$$
  ^\s*$$
  ^\s*Notes: -> EOF
  ^. -> Error
