set result "[exec nmap -sT -P0 -p <port1,port2,port3,etc> <host/ip>]"
The return result from nmap is:
Starting nmap 3.81 ( http://www.insecure.org/nmap/ ) at 2007-02-27 08:53 EST
Interesting ports on <resolved.hostname> (0.0.0.0):
PORT STATE SERVICE
1080/tcp closed socks
8080/tcp closed http-proxy
????/??? open/closed ????
Nmap finished: 1 IP address (1 host up) scanned in 0.018 seconds
I need to filter out the:
resolved.hostname (0.0.0.0)
and the port, state, and service name for each port
How can i do this, a simple regexp or a few lrange's or something?