in reply to how to check condition and then pattern match

Extend the second regexp to match only lines where "Ethernet" string is present. Something like this: ^([\S]+) ... Ethernet. See perlretut for more information.
Sorry if my advice was wrong.