In preparation for a re-IP of several servers I intend to search for all IP addresses on the servers which occur in settings files.
A simpleminded first attempt:
grep -e "[0-9]*\\.[0-9]*\\.[0-9]"
..produces false positives because strings with no digits is also allowed. Also, it finds version numbers like 1.2.3.4.5 which are not valid IP addresses.
I'm sure that someone has thought about this and come up with the perfect IP address finding regular expression grep that covers all exceptions.