regular expression for ipaddress and mac address

前端 未结 7 1473
耶瑟儿~
耶瑟儿~ 2021-01-06 05:59

can anyone suggest me the regular expression for ip address and mac address ?

i am using python & django

for example , http://[ipaddress]/SaveData/127.0.

7条回答
  •  离开以前
    2021-01-06 06:47

    alright so this is what I use for IPV4

    ([0-9]{1,3}.){3}[0-9]{1,3}

    tested with

    127.0.0.1 255.255.255.255

    and works for all

提交回复
热议问题