I have a message that is
msg = 'untagged ethernet 1 ethernet 2 ethernet 3'
and I want to write a regex that will find the 'ethernet x' pattern so that if i run
m = re.match(str(regex),msg)
print m.groups()
it will save the variable x and display something like
(1,2,3)
the expression that I have tried is
regex = 'untagged ((?: ethernet (\S+))*)'
but i am getting
('ethernet 1', 'ethernet 1', '1')\
as a result