IsValidIP – Validating an IP address

' Validate an IP address' Example:'   MessageBox.Show(IsValidIP("123.14.0.255")) ' => True'   MessageBox.Show(IsValidIP("256.14.0.255")) ' => FalseFunction IsValidIP(ByVal ipAddress As String) As Boolean    Return System.Text.RegularExpressions.Regex.IsMatch(ipAddress, _        "^(25[0-5]|2[0-4]d|[0-1]?d?d)(.(25[0-5]|2[0-4]d|[0-1]?d?d)){3}$")End Function

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: