I am new to Python, just trying to solve a few regex expressions, I was stuck with the below code. Kindly help me out on this.
import re
a = ["my mac is aa-bb-cc-33-44-SS","Hostname: xyz1"]
for i in a:
c = re.findall(r"\\D{2}-\\D{2}-\\D{2}-\\d{2}-\\d{2}-\\D{2}|:(.\*)",i)
print(c)
Output for above code is : [''] [' xyz1']
But the output really needed is ['aa-bb-cc-33-44-SS'] ['xyz1]