REGEX code help

Hi,

I need as regex code for the following line:

May-12-10 13:16:41 82.249.21.94 <apoxidikyt3339@proxad.net> user unknown terry@somedomain.com;

The above line is a log from ASSP

A similar regex is mentioned in ASSP - Fail2ban, which is using log with a different pattern ( notice :[SMTP Error] 550 5.1.1 , this is not in the log above)

Please advise.

Thanks

Sorry... I don't understand. What is the question?

Hi,

In ASSP - Fail2ban ,

Regex code for the log:

 Nov-14-09 00:14:50 54090-05322 201.244.255.72 <badguy@gtgwhhrthrth.com> [SMTP Error] 550 5.1.1 User unknown: your.user@your-domain.com

is

.*? \d{5}-\d{5} <HOST> <.*?> \[SMTP Error\] (.*) 

I want help on setting up regex code for the log:

May-12-10 13:16:41 82.249.21.94 <apoxidikyt3339@proxad.net> user unknown terry@somedomain.com;

Not really sure, if this is what you're after:

^[A-Z][a-z][a-z]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] [0-9][0-9]\?[0-9]\?.[0-9][0-9]\?[0-9]\?.[0-9][0-9]\?[0-9]\?.[0-9][0-9]\?[0-9]\? <.*> user unknown.*\?

Date+Time IP Stuff between < and > user unknown Stuff after user unknown (Optional)

I tried it like this:

grep -o "regexfromabovehere" filename

Replace the sample's <HOST> string with the IP address for your host value (or is this the remote IP...?). Otherwise, it's pretty straightforward and lean provided it works...I'm often limited to approaches like pseudocoder's attempt since my system isn't quite the best regex env.

thanks for giving it a shot, but it did not work as expected.