I have an array filled with values from a python-read .txt file, I want to break the information from that file with only what interests me, which are the un commented values, srv2 and srv3
SCRIPT
# value filter without comments
outfinally = []
outfinally = [re.split(r'\s\s+|\s*#\s*|\b\d+\b',line) for line in output[0].splitlines()]
for line in outfinally:
print(line)
ARCHIVE
########################################################################
#
# Licensed Materials
#
#
# (C) Copyright. All Rights Reserved
#
#
# ========================================================
# Module Information:
#
# DESCRIPTION:
# ping.file
#
######################################################################
#srv1 300
10.10.10.1 300
srv2 300
srv3 300
OUTPUT
['', '========================================================']
['', 'Module Information:']
['', '']
['', 'DESCRIPTION:']
['', 'ping.file']
['', '']
['srv2\t', '']
['srv3\t', '']
DESERIED OUTPUT
srv2
srv3