regex to test ip v4 address


/ Published in: Other
Save to your folder(s)



Copy this code and paste it in your HTML
  1. preg_match('/^(?:25[0-5]|2[0-4]d|1dd|[1-9]d|d)(?:[.](?:25[0-5]|2[0-4]d|1dd|[1-9]d|d)){3}$/',$ip)

Report this snippet


Comments


You need to login to view comments.