def icmp_ace_get(str)
      # rubocop:disable Metrics/LineLength
      # fragments is nvgen at a different location than all other
      # proto_option so get rid of it so as not to mess up other fields
      str.sub!('fragments ', '')
      regexp = Regexp.new('(?<seqno>\d+) (?<action>\S+)'\
                 ' *(?<proto>\d+|\S+)'\
                 ' *(?<src_addr>any|host \S+|[:\.0-9a-fA-F]+ [:\.0-9a-fA-F]+|[:\.0-9a-fA-F]+\/\d+|addrgroup \S+)'\
                 ' *(?<dst_addr>any|host \S+|[:\.0-9a-fA-F]+ [:\.0-9a-fA-F]+|[:\.0-9a-fA-F]+\/\d+|addrgroup \S+)'\
                 ' *(?<proto_option>\S+)?'\
                 ' *(?<precedence>precedence \S+)?'\
                 ' *(?<dscp>dscp \S+)?'\
                 ' *(?<time_range>time-range \S+)?'\
                 ' *(?<packet_length>packet-length (range \d+ \d+|(lt|eq|gt|neq) \d+))?'\
                 ' *(?<ttl>ttl \d+)?'\
                 ' *(?<vlan>vlan \d+)?'\
                 ' *(?<set_erspan_gre_proto>set-erspan-gre-proto \d+)?'\
                 ' *(?<set_erspan_dscp>set-erspan-dscp \d+)?'\
                 ' *(?<redirect>redirect \S+)?')
      regexp_no_proto_option = Regexp.new('(?<seqno>\d+) (?<action>\S+)'\
                 ' *(?<proto>\d+|\S+)'\
                 ' *(?<src_addr>any|host \S+|[:\.0-9a-fA-F]+ [:\.0-9a-fA-F]+|[:\.0-9a-fA-F]+\/\d+|addrgroup \S+)'\
                 ' *(?<dst_addr>any|host \S+|[:\.0-9a-fA-F]+ [:\.0-9a-fA-F]+|[:\.0-9a-fA-F]+\/\d+|addrgroup \S+)'\
                 ' *(?<precedence>precedence \S+)?'\
                 ' *(?<dscp>dscp \S+)?'\
                 ' *(?<time_range>time-range \S+)?'\
                 ' *(?<packet_length>packet-length (range \d+ \d+|(lt|eq|gt|neq) \d+))?'\
                 ' *(?<ttl>ttl \d+)?'\
                 ' *(?<vlan>vlan \d+)?'\
                 ' *(?<set_erspan_gre_proto>set-erspan-gre-proto \d+)?'\
                 ' *(?<set_erspan_dscp>set-erspan-dscp \d+)?'\
                 ' *(?<redirect>redirect \S+)?')
      temp = regexp.match(str)
      po = temp[:proto_option]
      if po.nil?
        return temp
      # redirect can be proto_option or an actual redirect to interface
      elsif po.strip.match(/redirect$/)
        if str.match(/Ethernet|port-channel/)
          # if proto_option is given as redirect and also redirect to intf
          # we need to do extra processing
          return temp if check_redirect_repeat(str)
          return regexp_no_proto_option.match(str)
        end
      # the reserved keywords check
      elsif po.strip.match(/precedence$|dscp$|time-range$|packet-length$|ttl$|vlan$|set-erspan-gre-proto$|set-erspan-dscp$|log$/)
        return regexp_no_proto_option.match(str)
      else
        return temp
      end
      # rubocop:enable Metrics/LineLength
    end
def icmp_ace_get(str)
      # rubocop:disable Metrics/LineLength
      # fragments is nvgen at a different location than all other
      # proto_option so get rid of it so as not to mess up other fields
      str.sub!('fragments ', '')
      regexp = Regexp.new('(?<seqno>\d+) (?<action>\S+)'\
                 ' *(?<proto>\d+|\S+)'\
                 ' *(?<src_addr>any|host \S+|[:\.0-9a-fA-F]+ [:\.0-9a-fA-F]+|[:\.0-9a-fA-F]+\/\d+|addrgroup \S+)'\
                 ' *(?<dst_addr>any|host \S+|[:\.0-9a-fA-F]+ [:\.0-9a-fA-F]+|[:\.0-9a-fA-F]+\/\d+|addrgroup \S+)'\
                 ' *(?<proto_option>\S+)?'\
                 ' *(?<precedence>precedence \S+)?'\
                 ' *(?<dscp>dscp \S+)?'\
                 ' *(?<time_range>time-range \S+)?'\
                 ' *(?<packet_length>packet-length (range \d+ \d+|(lt|eq|gt|neq) \d+))?'\
                 ' *(?<ttl>ttl \d+)?'\
                 ' *(?<vlan>vlan \d+)?'\
                 ' *(?<set_erspan_gre_proto>set-erspan-gre-proto \d+)?'\
                 ' *(?<set_erspan_dscp>set-erspan-dscp \d+)?'\
                 ' *(?<redirect>redirect \S+)?')
      regexp_no_proto_option = Regexp.new('(?<seqno>\d+) (?<action>\S+)'\
                 ' *(?<proto>\d+|\S+)'\
                 ' *(?<src_addr>any|host \S+|[:\.0-9a-fA-F]+ [:\.0-9a-fA-F]+|[:\.0-9a-fA-F]+\/\d+|addrgroup \S+)'\
                 ' *(?<dst_addr>any|host \S+|[:\.0-9a-fA-F]+ [:\.0-9a-fA-F]+|[:\.0-9a-fA-F]+\/\d+|addrgroup \S+)'\
                 ' *(?<precedence>precedence \S+)?'\
                 ' *(?<dscp>dscp \S+)?'\
                 ' *(?<time_range>time-range \S+)?'\
                 ' *(?<packet_length>packet-length (range \d+ \d+|(lt|eq|gt|neq) \d+))?'\
                 ' *(?<ttl>ttl \d+)?'\
                 ' *(?<vlan>vlan \d+)?'\
                 ' *(?<set_erspan_gre_proto>set-erspan-gre-proto \d+)?'\
                 ' *(?<set_erspan_dscp>set-erspan-dscp \d+)?'\
                 ' *(?<redirect>redirect \S+)?')
      temp = regexp.match(str)
      po = temp[:proto_option]
      if po.nil?
        return temp
      # redirect can be proto_option or an actual redirect to interface
      elsif po.strip.match(/redirect$/)
        if str.match(/Ethernet|port-channel/)
          # if proto_option is given as redirect and also redirect to intf
          # we need to do extra processing
          return temp if check_redirect_repeat(str)
          return regexp_no_proto_option.match(str)
        end
      # the reserved keywords check
      elsif po.strip.match(/precedence$|dscp$|time-range$|packet-length$|ttl$|vlan$|set-erspan-gre-proto$|set-erspan-dscp$|log$/)
        return regexp_no_proto_option.match(str)
      else
        return temp
      end
      # rubocop:enable Metrics/LineLength
    end
icmp ace getter