Value NEIGHBOR (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
Value REMOTE_AS (\d+)
Value PEER_GROUP (\S+)
Value REMOTE_ROUTER_ID (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
Value BGP_STATE (\w+)
Value LOCALHOST_IP (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
Value LOCALHOST_PORT (\d+)
Value REMOTE_IP (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
Value REMOTE_PORT (\d+)

Start
  # Capture first line, which shows the BGP neighor and remote AS number
  ^BGP\s+neighbor\s+is -> Continue.Record
  ^BGP\s+neighbor\s+is\s+${NEIGHBOR},\s+remote\s+AS\s+${REMOTE_AS}
  # Capture BGP peer group
  # Example: 'Member of peer-group RR_SERVERS for session parameters'
  ^\s*Member\s+of\s+peer-group\s+${PEER_GROUP}
  # 
  # Capture remote router ID
  # Example: ' BGP state = Established, up for 7w3d'
  ^.+remote\s+router\s+ID\s+${REMOTE_ROUTER_ID}
  #
  # Capture BGP state
  # Example: ' BGP state = Established, up for 7w3d'
  ^\s+BGP\s+state\s+=\s+${BGP_STATE}
  #
  #
  # Match local host and port
  # Example: 'Local host: 10.10.255.13, Local port: 39443'
  ^Local\s+host:\s+${LOCALHOST_IP},\s+Local\s+port:\s+${LOCALHOST_PORT}
  # 
  # Match local host and port
  # Example: 'Local host: 10.10.255.13, Local port: 39443'
  ^Foreign\s+host:\s+${REMOTE_IP},\s+Foreign\s+port:\s+${REMOTE_PORT}
  #^.+ -> Error
