Test, validate and match regular expressions
This regex matches dotted decimal IPv4-like addresses, with each octet allowing 1-3 digits, and optionally followed by a CIDR prefix (slash plus 1 or 2 digits). It is useful for basic IP address validation, log parsing, or extracting host addresses and network ranges from text. Note that it does not enforce octet values between 0-255, so it should be paired with additional checks for strict validation.