Say you want to match IP addresses. However, it's likely that an invalid IP address such as 192.168.1.256 will match with your regex as well.
What would you would need to do to validate that an IP address is valid, and why it is difficult?
Also, what are the conditions for why it is difficult to validate and IP address vs. match an IP address.