If you can, use a Regex:
(?<First>2[0-4]\d|25[0-5]|[01]?\d\d?)\.(?<Second>2[0-4]\d|25[0-5]|[01]?\d\d?)\.(?<Third>2[0-4]\d|25[0-5]|[01]?\d\d?)\.(?<Fourth>2[0-4]\d|25[0-5]|[01]?\d\d?)
If you can't, then you will need to handle the file manually, and scan for a digit, look for up to two more, followed by a dot, then 1 to 3 digits, then a dot, etc. If you find fully valid info, it's probably an IP address! If you don't, keep looking... There is no "short cut" on that, I'm afraid.