here there are some regular expressions that may help you recognise ip addresses:
binary format (separated by the '.'):
"([01]{8}.){3}[01]{8}"gsxi
decimal format (separated by the '.'):
"(([01][0-9][0-9]|2[0-4][0-9]|25[0-5]).){3}[01][0-9][0-9]|2[0-4][0-9]|25[0-5]"gsxi