>now its getting complicated with my very modest regex knowledge.

Use the link below - read it. Even you know a little (very modest) about 
regular expression, start with the "Fundamentals". 
If you ever reach the end of the "Black Belt Program" , you'll become a 
regex specialist - a "Regex-Ninja" :):):)

http://www.rexegg.com/

As such a specialist, you are than ready to know the meaning of life - the 
following regex is matching it.

^(?=(?!(.)\1)([^\DO:105-93+30])(?-1)(?<!\d(?<=(?![5-90-3])\d))).[^\WHY?]$ 

Unbelievable - but this regex works and it can be explained (by a 
specialist)!

But also assp uses such regex "Monsters" like:

\b[U\xB5\xF9-\xFC]+\s?\S?\s?\W?(?:\/\|\/|N)+\s?\S?\s?\W?[I1!|lt\xEC-\xEF]+\s?\S?\s?\W?(?:\\\/|V)+\s?\S?\s?\W?[e\xE3\xE8-\xEB]+\s?\S?\s?\W?R+\s?\S?\s?\W?[S$5]+\s?\S?\s?\W?[I1!|lt\xEC-\xEF]+\s?\S?\s?\W?T+\s?\S?\s?\W?Y\b.*?\bD+\s?\S?\s?\W?[e\xE3\xE8-\xEB]+\s?\S?\s?\W?G+\s?\S?\s?\W?R+\s?\S?\s?\W?[e\xE3\xE8-\xEB]+\s?\S?\s?\W?[e\xE3\xE8-\xEB]\b

which is longer but much less complicated than the meaning of life.

In earnest - this is the absolute best regular expression tutorial in the 
web  http://www.rexegg.com/   ! 

The more technical regular expression tutorial (no tricks, no 
entertainment, no joke, no fun, less examples - but simply all the truth) 
is

http://perldoc.perl.org/perlretut.html

Thomas


Von:    katip <ka...@katip.com>
An:     ASSP development mailing list <assp-test@lists.sourceforge.net>
Datum:  22.09.2015 11:56
Betreff:        Re: [Assp-test] Dubious redRe



alles klar. thanks a bunch!

Katip

-------- Original Message --------
*Subject: *Re: [Assp-test] Dubious redRe
*From: *Thomas Eckardt <thomas.ecka...@thockar.com>
*To: *ASSP development mailing list <assp-test@lists.sourceforge.net>
*Date: *Tue Sep 22 2015 12:47:03 GMT+0300 (GTB Standard Time)
>> ok, great, there is a space after 0-9 right?
> yes, because the leading name can be written like "Thomas Eckardt" - 
there
> is a space in it
>
> Thomas
>
>
>
> Von:    katip <ka...@katip.com>
> An:     ASSP development mailing list <assp-test@lists.sourceforge.net>
> Datum:  22.09.2015 11:33
> Betreff:        Re: [Assp-test] Dubious redRe
>
>
>
> ok, great, there is a space after 0-9 right?
>
> -------- Original Message --------
> *Subject: *Re: [Assp-test] Dubious redRe
> *From: *Thomas Eckardt <thomas.ecka...@thockar.com>
> *To: *ASSP development mailing list <assp-test@lists.sourceforge.net>
> *Date: *Tue Sep 22 2015 11:55:20 GMT+0300 (GTB Standard Time)
>> in this thread I wrote it
>>
>> (?:^|\n)From\:\s*(?:=\?[^?]+\?[BbQq]\?[^?]*\?=|"?
>> [A-Za-z0-9 ._-]*"?)?\s*[^@\r\n]+\@asdfgh\.com
>>
>>
>> put it in a single line
>>
>> Thomas
>>
>>
>>
>> Von:    katip <ka...@katip.com>
>> An:     ASSP development mailing list <assp-test@lists.sourceforge.net>
>> Datum:  22.09.2015 10:50
>> Betreff:        Re: [Assp-test] Dubious redRe
>>
>>
>>
>> hmm, indeed..
>> now its getting complicated with my very modest regex knowledge.
>> do me favour and tell me a safe example pls. you know what i want to
>> achieve. thks.
>>
>> Katip
>>>> does the job in short:
>>>> From\:\s*[^\r\n]+\@asdfgh\.com
>>> Yes - short! But the 'from:' header will be broken in to multiple
> lines,
>>> if it is too long (more than 72 chars) - like:
>>>
>>> From:
>> =?utf8?B?ABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCD?=[CR][LF]
>>> [TAB]   <users_name@@asdfgh.com>[CR][LF]
>>> next_header:
>>>
>>> or
>>>
>>> From: [CR[LF]]
>>> [TAB
>>>
> 
]=?utf8?B?ABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCD?=[CR][LF]
>>> [TAB]   <users_name@@asdfgh.com>[CR][LF]
>>> next_header:
>>>
>>>
>>> Your simple (lazy) regex will not match!
>>>
>>> Thomas
>>>
>>>
>>>
>>> Von:    katip <ka...@katip.com>
>>> An:     ASSP development mailing list 
<assp-test@lists.sourceforge.net>
>>> Datum:  22.09.2015 08:25
>>> Betreff:        Re: [Assp-test] Dubious redRe
>>>
>>>
>>>
>>> Thanks dear, yes, a "From:" containing "@asdfgh.com" should trigger
>> redRe.
>>> my problem was ignoring LF & CR and redRe
>>> "From\:\s.{1,100}\@asdfgh\.com" was too extensive with 100 chars. next
>>> line (which is a TO: and has nothing to do with redRe) happened to
>>> contain an adress containing "@asdfgh.com", thus matching redRe.
>>>
>>> now it looks like the following does the job in short:
>>> From\:\s*[^\r\n]+\@asdfgh\.com
>>>
>>> Katip
>>>
>>> -------- Original Message --------
>>> *Subject: *Re: [Assp-test] Dubious redRe
>>> *From: *Thomas Eckardt <thomas.ecka...@thockar.com>
>>> *To: *ASSP development mailing list <assp-test@lists.sourceforge.net>
>>> *Date: *Tue Sep 22 2015 07:59:37 GMT+0300 (GTB Standard Time)
>>>> Sorry , forgot that the senders name could be provided in ASCII.
>>>>
>>>> (?:^|\n)From\:\s*(?:=\?[^?]+\?[BbQq]\?[^?]*\?=|"?[A-Za-z0-9
>>>> ._-]*"?)?\s*[^@\r\n]+\@asdfgh\.com
>>>>
>>>> Thomas
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Von:    Thomas Eckardt <thomas.ecka...@thockar.com>
>>>> An:     ASSP development mailing list
> <assp-test@lists.sourceforge.net>
>>>> Datum:  21.09.2015 22:12
>>>> Betreff:        Re: [Assp-test] Dubious redRe
>>>>
>>>>
>>>>
>>>> Don't  know exactly what you want to do, but the regex works like
>>> expected
>>>> - like designed.
>>>>
>>>> I think you want to redlist a mail, if the FROM: address contains an
>>> email
>>>> address with the @asdfgh.com domain.
>>>> If I'm right, you have to be much more specific in the regex!
>>>>
>>>>
> 
(?:^|\n)From\:\s*(?:=\?[^?]+\?[BbQq]\?[^?]*\?=)?\s*[^@\r\n]+\@asdfgh\.com
>>>> The mail ...
>>>> (?:^|\n) - may start or have [LF] (in front of 'From:')
>>>> From\:\s* - has 'From:' and no or multiple spaces,LF,CR,TAB ...
>>>> (?:=\?[^?]+\?[BbQq]\?[^?]*\?=)? - may have a mime-encoded name
>>>>      \s* -  has no or multiple spaces,LF,CR,TAB ...
>>>> [^@\r\n]+ - has at least one character (up to infinity) that is not
> any
>>> of
>>>> : @,CR,LF
>>>> \@asdfgh\.com - and finaly has the domain
>>>>
>>>> because all assp regexes are not case sensitive, the [BbQq] may be
>>> written
>>>> as [bq]
>>>>
>>>> Thomas
>>>>
>>>>
>>>>
>>>> Von:    Katip <ka...@katip.com>
>>>> An:     ASSP development mailing list
> <assp-test@lists.sourceforge.net>
>>>> Datum:  21.09.2015 19:16
>>>> Betreff:        [Assp-test] Dubious redRe
>>>>
>>>>
>>>>
>>>> v2.4.5 (15229), win2k8r2
>>>>
>>>> (raw headers view)
>>>> ...
>>>> From: =?iso-8859-9?Q?Ali_Y=FCksel?= <aliyuk...@qwerty.com>
>>>> To: "Naci Bey" <n...@asdfgh.com>
>>>> ...
>>>>
>>>> redRe has an entry :
>>>> From\:\s.{1,100}\@asdfgh\.com
>>>>
>>>> message is tagged by ASSP:
>>>> X-Assp-Re-redRe: From: Ali
>>>> =?UTF-8?Q?Y=C3=BCksel=20?=<aliyuk...@qwerty.com> T
>>>> X-Assp-Redlisted: Yes (From: Ali
>>>> =?UTF-8?Q?Y=C3=BCksel=20?=<aliyuk...@qwerty.com>To...)
>>>>
>>>> header lines are appearantly perfect in raw view (checked with 
various
>>>> editors).
>>>> how does it come...? TIA
>>>>
>>>> Katip
>>>>
> 
------------------------------------------------------------------------------
>>>> _______________________________________________
>>>> Assp-test mailing list
>>>> Assp-test@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/assp-test
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> DISCLAIMER:
>>>> *******************************************************
>>>> This email and any files transmitted with it may be confidential,
>>> legally
>>>> privileged and protected in law and are intended solely for the use 
of
>>> the
>>>> individual to whom it is addressed.
>>>> This email was multiple times scanned for viruses. There should be no
>>>> known virus in this email!
>>>> *******************************************************
>>>>
>>>>
> 
------------------------------------------------------------------------------
>>>> _______________________________________________
>>>> Assp-test mailing list
>>>> Assp-test@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/assp-test
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> DISCLAIMER:
>>>> *******************************************************
>>>> This email and any files transmitted with it may be confidential,
>>> legally
>>>> privileged and protected in law and are intended solely for the use 
of
>>> the
>>>> individual to whom it is addressed.
>>>> This email was multiple times scanned for viruses. There should be no
>>>> known virus in this email!
>>>> *******************************************************
>>>>
>>>>
> 
------------------------------------------------------------------------------
>>>> _______________________________________________
>>>> Assp-test mailing list
>>>> Assp-test@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/assp-test
>>>>
> 
------------------------------------------------------------------------------
>>> _______________________________________________
>>> Assp-test mailing list
>>> Assp-test@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/assp-test
>>>
>>>
>>>
>>>
>>>
>>>
>>> DISCLAIMER:
>>> *******************************************************
>>> This email and any files transmitted with it may be confidential,
>> legally
>>> privileged and protected in law and are intended solely for the use of
>> the
>>> individual to whom it is addressed.
>>> This email was multiple times scanned for viruses. There should be no
>>> known virus in this email!
>>> *******************************************************
>>>
>>>
> 
------------------------------------------------------------------------------
>>> _______________________________________________
>>> Assp-test mailing list
>>> Assp-test@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/assp-test
>>>
>>
> 
------------------------------------------------------------------------------
>> _______________________________________________
>> Assp-test mailing list
>> Assp-test@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/assp-test
>>
>>
>>
>>
>>
>>
>> DISCLAIMER:
>> *******************************************************
>> This email and any files transmitted with it may be confidential,
> legally
>> privileged and protected in law and are intended solely for the use of
> the
>> individual to whom it is addressed.
>> This email was multiple times scanned for viruses. There should be no
>> known virus in this email!
>> *******************************************************
>>
>>
> 
------------------------------------------------------------------------------
>> _______________________________________________
>> Assp-test mailing list
>> Assp-test@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/assp-test
>>
> 
------------------------------------------------------------------------------
> _______________________________________________
> Assp-test mailing list
> Assp-test@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/assp-test
>
>
>
>
> DISCLAIMER:
> *******************************************************
> This email and any files transmitted with it may be confidential, 
legally
> privileged and protected in law and are intended solely for the use of 
the
>
> individual to whom it is addressed.
> This email was multiple times scanned for viruses. There should be no
> known virus in this email!
> *******************************************************
>
>
>
>
> 
------------------------------------------------------------------------------
>
>
> _______________________________________________
> Assp-test mailing list
> Assp-test@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/assp-test

------------------------------------------------------------------------------
_______________________________________________
Assp-test mailing list
Assp-test@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/assp-test




DISCLAIMER:
*******************************************************
This email and any files transmitted with it may be confidential, legally 
privileged and protected in law and are intended solely for the use of the 

individual to whom it is addressed.
This email was multiple times scanned for viruses. There should be no 
known virus in this email!
*******************************************************

------------------------------------------------------------------------------
_______________________________________________
Assp-test mailing list
Assp-test@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/assp-test

Reply via email to