IP Address
egrep "^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$"
MAC address
egrep "^([[:xdigit:]]{2}:){5}[[:xdigit:]]{2}$"
http://www.regular-expressions.info/examples.html
http://www.perlmonks.org/?node_id=83405
http://en.wikipedia.org/wiki/Regular_expression
沒有留言:
張貼留言