In my project we have a regular expression for IPV 4, below is the format for it.
I am not able to understand how it fits the IP.
private static final Pattern PATTERN = Pattern.compile(
"^(([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.){3}([01]?\\d\\d?|2[0-4]\\d|25[0-5])$");
I tried to understand using online tool - https://regex101.com/, but not able to get clarity how it works.
The same solution is given in this SO also - Validate IPv4 address in Java