The line continuation is supported in every file.

How ever, I've done a positioning mistake in the used regex

current: s/\\(?<!\\)\n//gos
right: s/(?<!\\)\\\n//gos

And I've found another mistake. The  line continuation was not working for 
the analyzer - the matching line in a file was not found (and not shown)

This will be fixed.

Thomas



Von:    "K Post" <nntp.p...@gmail.com>
An:     "ASSP development mailing list" <assp-test@lists.sourceforge.net>
Datum:  08.09.2022 21:14
Betreff:        [Assp-test] Line Continuation in config files



Back in November 2011, I saw:
fixed in assp 2.6.6 *SPAM-Evaporator* build 21317:
- files used in configuration parameters are now 
supporting line continuation by adding a backslash '\' at the end of 
a line

I'm just trying this now, but it doesn't seem to be working.   

When you say "files used in configuration parameters" do you only mean 
files that use the # include syntax, or should this work for things like 
bomgHeaderRe where we have file:/files/bombHeaderRe.txt in the GUI?

If line continuation is only supported in # include files, could you 
extend the functionality to work in files that are directly referenced by 
the GUI (file:files/ext.txt)?

Here's what I'm experiencing:

In my bombHeaderRe file, which is directly referenced in the gui as 
file:files/bomgHeaderRe.txt, I have

~(?(DEFINE)(?<TLD>[a-z]{2,6}))(?(DEFINE)(?<HOSTorNAME>[a-z\d\-]+))(?(DEFINE)(?<ANYCHR>[^\n]*?))(?:^|\n)(?:(?<tag>to):(?&ANYCHR)(?<ToMatch>(?&HOSTorNAME))\@(?:(?&HOSTorNAME)\.)+(?&TLD)|(?<tag>from):(?&ANYCHR)\@(?:(?&HOSTorNAME)\.)*?(?<FromMatch>(?&HOSTorNAME))\.(?&TLD)).+?\n(?!\k<tag>)(?:to:(?&ANYCHR)\k<FromMatch>\@(?:(?&HOSTorNAME)\.)+(?&TLD)|from:(?&ANYCHR)\@(?:(?&HOSTorNAME)\.)*?\k<ToMatch>\.(?&TLD))~=>-10

all on a single line.  That scores -10 to any message where to: 
senderdom...@ourdomain.com and from: anything@*.SenderDomain.com appear in 
the header, in any order.  (thanks for all the help building this, it's 
been incredibly beneficial)

I just tried splitting that regex into multiple lines by adding a \ at the 
end of lines.   I'm not putting a space

~(?(DEFINE)(?<TLD>[a-z]{2,6}))(?(DEFINE)(?<HOSTorNAME>[a-z\d\-]+))(?(DEFINE)(?<ANYCHR>[^\n]*?))\
(?:^|\n)(?:(?<tag>to):(?&ANYCHR)(?<ToMatch>(?&HOSTorNAME))\@(?:(?&HOSTorNAME)\.)+(?&TLD)|(?<tag>from):(?&ANYCHR)\@(?:(?&HOSTorNAME)\.)*?(?<FromMatch>(?&HOSTorNAME))\.(?&TLD)).+?\n\
(?!\k<tag>)(?:to:(?&ANYCHR)\k<FromMatch>\@(?:(?&HOSTorNAME)\.)+(?&TLD)|from:(?&ANYCHR)\@(?:(?&HOSTorNAME)\.)*?\k<ToMatch>\.(?&TLD))~=>-10

Saving the file does not trigger an error in the GUI, but the analyze GUI 
no longer shows matches for the same email that does when the regex is on 
a single line.  


Thanks![Anhang "att948xp.txt" gelöscht von Thomas Eckardt/eck] [Anhang 
"attmyh5k.txt" gelöscht von Thomas Eckardt/eck] 


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

Reply via email to