Value HOSTNAME (\S+)

Start
  # Capture date output by XR by 'show run hostname' first
  ^\S+\s+\S+\s+\d+\s+\d+:\d+:\d+\.\d+\s+\S+$$
  # Capture hostname
  ^hostname\s+${HOSTNAME}$$
  ^\s*$$
  ^. -> Error
