73_km200: bugfix - Allowing Port number behind IP address

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@25200 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Sailor 2021-11-07 16:31:04 +00:00
parent 88fe1259b9
commit 1709105ca7

View File

@ -138,7 +138,8 @@ sub km200_Define($$)
if (int(@a) == 5)
{
###START### Check whether IPv4 address is valid
if ($url =~ m/^(?:(?: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]?)$/)
# if ($url =~ m/^(?:(?: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]?)$/)
if ($url =~ m/^(?:(?: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]?)(:[0-9]{1,5})?$/)
{
Log3 $name, 4, $name. " : km200 - IPv4-address is valid : " . $url;
}