Regular Expression Rule for MAC address


I have the following example below which I would like to extract the device name, MAC address and time to uses a monitoring ticket for online and offline devices.

Subject Line: Alert for SiteName - wireless - APs came up

Email Body

2 access point on the Site Name network regained contact with the Meraki cloud.

AP1 e4:55:a8:2d:8c:65 11:27 AM GMT on Mar 26
AP2 e4:55:a8:2d:8c:66 11:27 AM GMT on Mar 26

- Cisco Meraki

I will be planning on Iterating though the array and matching against configuration items.

Thank you.

Hi @Richard

Try this regular expression:

/^(?<name>\S+) (?<mac>\w\w:\w\w:\w\w:\w\w:\w\w:\w\w) \V*$/m

Here it is with your sample data showing how it would capture: