PCAP Strings • Set 4
PCAP Strings Practice Test 4 — 15 questions with explanations. Free, no signup.
You are a network engineer troubleshooting a script that processes router configuration files. The script reads a configuration line from a file: 'interface GigabitEthernet0/1
ip address 192.168.1.1 255.255.255.0
no shutdown'. The script needs to extract the interface name and IP address. The current code uses string split operations but fails when the line has extra spaces or tabs. For example, when the line is 'interface GigabitEthernet0/1', the split returns ['interface', '', '', 'GigabitEthernet0/1'] and the script fails. You need to modify the script to robustly extract the interface name and IP address regardless of whitespace. Which approach should you take?Choose an answer to begin — your selection is scored in the full session.
15 questions · instant feedback and full explanations after every question.