2012-03-13

regex: match mac address

http://manoharbhattarai.wordpress.com/2012/02/17/regex-to-match-mac-address/

ifconfig eth0 | egrep –-only-matching ‘(([0-9A-Fa-f]{2}[-:]){5}[0-9A-Fa-f]{2})|(([0-9A-Fa-f]{4}\.){2}[0-9A-Fa-f]{4})’

No comments: