I have a requirement in which I have a range of 2 IP addresses.
192.168.1.1-192.168.1.1
I want to check that whether both side of dash are valid
IP addresses. For single IP address I have a regex but I am not able to add a '-' for checking 2.
Need some help. Below is single IP regex.
^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$