#C13689. IPv4 Address Extraction
IPv4 Address Extraction
IPv4 Address Extraction
You are given a string that may contain several substrings resembling IPv4 addresses. Your task is to extract all valid IPv4 addresses from the input. An IPv4 address consists of four numerical octets separated by dots. Each octet must be in the range \(0\) to \(255\). Leading zeros are allowed.
Example:
Input: "The IP address is 192.168.1.1"
Output: 192.168.1.1
If no valid IPv4 addresses are found, output nothing.
inputFormat
The input is provided via standard input (stdin) as a string. The string may span multiple lines and contains alphanumeric characters and punctuation.
outputFormat
For each valid IPv4 address extracted from the input, print the address on a separate line to standard output (stdout). If no valid IPv4 addresses are found, output nothing.
## sampleThe IP address is 192.168.1.1
192.168.1.1