I have a strings as mentioned in the below format, i would like to remove only IPv6 address from the string and print only the IPv4 address as a string. I tried with sub string and regex , but I am unable to get correct regex for this string. Could any one help to provide the solution.
Actual format of Inputs string given to python program as below format (square brackets included), Where Ipv6 address can be present either at starting or ending of the string.
['fe80::2ff:fe21:30f/64', '17.2.1.2/24']
['fe80::2ff:fee4:2b43/64', '17.2.1.3/24']
['17.2.10.2/24', 'fe80::2ff:fe42:f251/64]
['192.168.4.1/30', 'fe80::2ff:fe19:cdd7/64']
['fe80::2ff:fe1e:e328/64', '17.2.4.1/24']
Output should be display as only ipv4 address as strings
"17.2.1.2/24"
"17.2.1.3/24"
"17.2.10.2/24"
"192.168.4.1/30"
"17.2.4.1/24"