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}$"


[Refrence]

http://farwill-linux.blogspot.tw/2011/07/ip-addressmac-addressregular-expression.html

創作者介紹
創作者 I'm not 梵谷 的頭像
ps030010

I'm not 梵谷

ps030010 發表在 痞客邦 留言(0) 人氣( 12 )