Re: [Exim] regex help needed please

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Nico Erfurth
Data:  
Para: Jeffrey Wheat
CC: Exim users list
Asunto: Re: [Exim] regex help needed please
Jeffrey Wheat wrote:
> This is slightly OT but pertains to exim log processing.
>
> I am trying to match on the following:
>
> [1\23] 2002-12-17 14:00:09 18OMwr-000JED-00 H=sbs1941.customer.demon.com (jbrserver.sbs1941.customer.demon.com)
>[194.159.222.168] F=davedader@???> rejected after DATA:

ACL-Reject: Forgery:NOT FROM HOTMAIL
>( from sbs1941.customer.demon.com ([194.159.222.168]

helo=jbrserver.sbs1941.customer.demon.com)
>
> With the following:
>
> if ($text =~ /^[\d\/\d]\s\d{4}-\d\d-\d\d\s\d\d:\d\d:\d\d/) {

                   ^^^^^This is a character group, you will have to write
/^\[\d\/\d\]\s\d{4}-\d\d-\d\d\s\d\d:\d\d:\d\d/


> I am failing miserably though on this. Any help is greatly appreciated. The camel book
> has helped a lot but I am still missing something.