Closed bitcanon closed 1 year ago
Try this:
((?<![:\-.\w])(?:[\da-fA-F]{2}[:\.-]){5}[\da-fA-F]{2}(?![:\-.\w]))
Test here: https://regex101.com/r/ekvkc1/1
This is a non-issue at the moment. Also seems quite impossible since Go doesn't support regex lookaheads.
Try to improve the matching of MAC addresses. The current version finds a MAC in this string:
It should not find a MAC in this string since there is a
:0B
in the end: AA:18:FD:74:E1:A6:0B AA:18:FD:74:E1:A6