Sorry I forgot the following: Assume the following message text:
Hello member, we have huge ..... to stretch .. ! .... in her hand! and you use ~((\bmember\b|\bstretch\b|\bhuge\b|\bher\b).*?(?!\g{-1})){4}~=>40 any other word - that is between 'member' and 'her', that would be match an other regex that follows - will not be found! The order of the word does not matter. Thomas Thomas Eckardt/eck <thomas.ecka...@thockar.com> 30.09.2009 20:38 Bitte antworten an ASSP development mailing list <assp-test@lists.sourceforge.net> An ASSP development mailing list <assp-test@lists.sourceforge.net> Kopie Thema [Assp-test] Antwort: New Regex Features Hilario, just try to learn more about Perl regular expressions and your problem could be solved (easy). for example: you want to detect that (all) 4 words are in one mail: member,stretch,huge,her and you want to weight this with 40 penalty points - use: ~((\bmember\b|\bstretch\b|\bhuge\b|\bher\b).*?(?!\g{-1})){4}~=>40 the number in scope " {4} " tells the regex engines how many of that words must be in the mail. If you want to weigth different counts of these words, you can do the following ~((\bmember\b|\bstretch\b|\bhuge\b|\bher\b).*?(?!\g{-1})){4}~=>80 ~((\bmember\b|\bstretch\b|\bhuge\b|\bher\b).*?(?!\g{-1})){3}~=>40 ~((\bmember\b|\bstretch\b|\bhuge\b|\bher\b).*?(?!\g{-1})){2}~=>20 ~((\bmember\b|\bstretch\b|\bhuge\b|\bher\b).*?(?!\g{-1})){1}~=>10 Notice that you have to test the more complex first and the most simple last. Thomas Hilario Fochi Silveira <assp-t...@soliton.com.br> 30.09.2009 16:06 Bitte antworten an ASSP development mailing list <assp-test@lists.sourceforge.net> An ASSP development mailing list <assp-test@lists.sourceforge.net> Kopie Thema [Assp-test] New Regex Features I just tested the new assp.pl 1.5.1.9 (0.0.09) features and the concept of a total scoring value as the sum of all valences(weights) of all found Regex is really nice. It worked very well. It will be wonderful if the concept can be extended to all remaining spambomb regular expression filters because about 100% of regex in the BlackRe are really strict and (blackReMaxHits) is going to be 1 in most cases. However, there are lots of weaker "suspicious phrases" that when present together in the same mail will really assure it is a spam. I always notice in my server that the Nigerian (419) fraud are very successful to pass trough ASSP because they are almost always sent by well configured mails servers with valid mail accounts and plain English text. They use phrases that could be in any valid mail, but they do have an "accent" (similar to what you notice when I write in English, you may not be sure that I am Brazilian, but you notice that my native language is not English) Examples: (I used underscores bellow to let this mail pass my on filters) abandoned_sum dormant_account I bring_you_greetings next_of_kin transfer_a_huge sum utmost_secrecy All of the above phrases are plain English, but they are unusual, so alone, they are nothing more than suspicious worlds, but if they come together in the same mail than it is highly probable that this is a Nigerian 419 advanced fee fraud All the Best Hilário Fochi Silveira ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ 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! ******************************************************* ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ 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! ******************************************************* ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Assp-test mailing list Assp-test@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/assp-test