[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Less and regular expressions



Account for Debian group mail wrote:
Hello,

I'm doing a search of a syslog file using less - and having a brain fart.

I'm trying to make a regular search expression that will look for the word
"greylist" and the word "*.aol.com" in the same line of the syslog.

I just do not remember how to do this and looking around the Internet I'm
not finding what I need.

Can anyone help me?

Thanks,

Ken



That depends ;)

Are you just looking for 'a' followed by 'b', or might you want to see that and 'b' followed by 'a'?

Is the '*' in '*.aol.com' literal? And do you want to find only cases where both words happen, or are you also interested in lines with one or the other, alone?

The simple case ('a' followed by 'b', no specific regex characters to take literally) would be to just say: greylis.*aol\.com

Hope this helps;) If you need a more complex search, I'll can take a second (longer) look.

--
Bob McGowan

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


Reply to: