Cisco Mac Address Regex

Reference post.....I needed to match a cisco format mac address, not the best, but it works...

String: 0000.0c07.ac01 
Matching regex: ([0-9A-Fa-f]){4}\.([0-9A-Fa-f]){4}\.([0-9A-Fa-f]){4} String: 00:00:0c:07:ac:01 
Matching regex: ([0-9A-Fa-f]){2}\:([0-9A-Fa-f]){2}\:([0-9A-Fa-f]){2}\:([0-9A-Fa-f]){2}\:([0-9A-Fa-f]){2}\:([0-9A-Fa-f]){2}
Tagged as cisco , mac address
Written by Andrew Konkol on January 9th, 2009

2 Comments

[...] www.copyandwaste.com » Cisco Mac Address Regex - Regex to match a Cisco MAC address (0000.0c). [...]

Internets of Interest: 10th Jan | My Etherealmind
January 10, 2009
[...] www.copyandwaste.com » Cisco Mac Address Regex – Regex to match a Cisco MAC address (0000.0c). [...]

Internets of Interest: 12th Jan — My Etherealmind
July 28, 2011
Log in with Twitter, Google, Facebook, LinkedIn to leave a comment.