On 06 Jul 2020, at 11:06, Robert Chalmers <racu...@gmail.com> wrote:
> No to the first.
> I’m not missing any by grepping ‘unknown’ - if they are unknown users

They are not, that is not what "unknown" means on that log line.

Also, your attempt to match IP addresses over matches other numbers.

In this text

version=13.0 (3645.0.6.2.3)

Your grep would be matching 645.0.6.2

If you want a good regex to match Eps there are a few out there.

This will match an IPv4 and nothing that could not be an IPv4 address. It still 
may match something else, so it is best to also grep for any delimiters at the 
front and back.

$ grep -E -o 
"(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"

There are shorter versions, but they rely on features that grep -E doesn't 
support on my system.



-- 
A man does not make his destiny: he accepts it or denies it.

Reply via email to