This is a regular expression ([a-z0-9]{1,4}:+){3,5}[a-z0-9]{1,4}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3 } almost completed the task of matching only IP addresses (v4 and v6) and nothing else, but, unfortunately, for the text below and similar text, it also displays fields in bold
from mail.example.com (example.com. [213.239.250.131]) via mx.google.com with ESMTPS ID xc4si15480310lbb.82.2 014.10.26.06 .16.58 for (version = TLSv1.2 cipher = ECDHE-RSA-AES128-GCM -SHA256 bit = 128/128); Sun, Oct 26, 2014 6:16:58 a.m. -0700 (PDT)
Received: from ssservices1-1 (192.168.20.142) from mail.supershuttle.com (192.168.20.110) with Microsoft SMTP server ID 14.2.347.0 ; Tue, 21 April 2015
Received: from ssservices1-1 (192.168.20.142) from mail.supershuttle.com (192.168.20.110) with Microsoft SMTP server identifier (TLS) 14.2.347.0 ; Tue, April 21, 2015
Received: from plug.mysitehosted.com (plug.mysitehosted.com [10.248.1.153]) (using TLSv1 with DHE-RSA-AES256-SHA encryption) to 0.0.0.0 : 2500 (trex / 5.0.19); Tue, March 11, 2014 06:14:03 GMT
What is the best approximation (I will use Python) to exclude these matches? The two are preceded by the text "id", although in the first case it is not directly in front of it.
source share