Specific regular exp. creating

For all users, who don't speak German!

Moderator: Forum-Team

Specific regular exp. creating

Beitragvon HanSatan » 21. Feb 2009, 13:11

Dear Spamihilator Coder.

I would like to create reg exp. to eliminate sucha line(s):

New York, NY, 60262

or

New York, NY, 49482

So I created such reg exp.:

(?i)New\sYork,\sNY,\s[\0123456789]{1,5}

But it also deletes lines without zip code at the end. Could you give me a tip how to create working reg exp to eliminate specific line including zip code? What am I doing wrong?

Regards.
HanSatan
 

Re: Specific regular exp. creating

Beitragvon HanSatan » 21. Feb 2009, 13:25

Ok I fixed it, now it works fine:

(?i)New\sYork,\sNY,\s[0123456789]{5,20}

But maybe there's some other (better way) to filter it out?

Thx in advance for any tips...
HanSatan
 

Re: Specific regular exp. creating

Beitragvon Chactory » 21. Feb 2009, 14:45

Hi,

this is cool, you asked and answered yourself. :wink: I'm delighted about somebody else using RegExes with the Spam-Word Filter.

For me, the line you've created seems to be perfect. My only objection would be, that it's a relatively unspecific entry. But I understand that this may be a help, if it belongs to a recurrently reappearing spam mail.

Perhaps you want to help me test my new spam-words list? If you want then download my updated list, unpack it, copy it into the folder "C:\Programs\Spamihilator", end and restart Spamihilator, and send me a feedback about how it works with you.

It could be set too critical for english users, but I would be glad someone in an anglophone country to try it. But it could be better to save your old "spampoints.ini", e.g. as "spampoint.ini_old".

Regards, Chactory
Vostro 3450, Intel Core i5 2410M 2,3 GHz, 4 GB DDR3 SDRAM 1333 MHz, Windows 7 Pro 64 Bit SP1
Online-Hilfe: «DE» − Chactory's Tipps: «DE» − Anbuva's FAQ: «DE» und «EN» − Bob Loefflers FAQ: «EN»

Bild
Benutzeravatar
Chactory
Administrator
Administrator
 
Administration
Beta-Tester
Forum-Team
 
Beiträge: 8677
Registriert: 10. Jan 2004, 00:19
Wohnort: Kiel (D)

Re: Specific regular exp. creating

Beitragvon HanSatan » 21. Feb 2009, 14:51

Hi,

Yes indeed I did :lol:

And yeah it doesn't get use like "universal" spam word but approx. 25-40% of my spam mails contain this line so it's helpfull ;)
HanSatan
 

Re: Specific regular exp. creating

Beitragvon Chactory » 21. Feb 2009, 14:53

Hi! Please read my posting again, because in the same moment as you wrote your new posting, I added a further question. Regards, Chactory
Vostro 3450, Intel Core i5 2410M 2,3 GHz, 4 GB DDR3 SDRAM 1333 MHz, Windows 7 Pro 64 Bit SP1
Online-Hilfe: «DE» − Chactory's Tipps: «DE» − Anbuva's FAQ: «DE» und «EN» − Bob Loefflers FAQ: «EN»

Bild
Benutzeravatar
Chactory
Administrator
Administrator
 
Administration
Beta-Tester
Forum-Team
 
Beiträge: 8677
Registriert: 10. Jan 2004, 00:19
Wohnort: Kiel (D)

Re: Specific regular exp. creating

Beitragvon Chactory » 21. Feb 2009, 15:17

Hi,

HanSatan hat geschrieben:approx. 25-40% of my spam mails contain this line so it's helpfull ;)
this is strange ... where do those mails come from? :lol:

Regards, Chactory
Vostro 3450, Intel Core i5 2410M 2,3 GHz, 4 GB DDR3 SDRAM 1333 MHz, Windows 7 Pro 64 Bit SP1
Online-Hilfe: «DE» − Chactory's Tipps: «DE» − Anbuva's FAQ: «DE» und «EN» − Bob Loefflers FAQ: «EN»

Bild
Benutzeravatar
Chactory
Administrator
Administrator
 
Administration
Beta-Tester
Forum-Team
 
Beiträge: 8677
Registriert: 10. Jan 2004, 00:19
Wohnort: Kiel (D)

Re: Specific regular exp. creating

Beitragvon HanSatan » 21. Feb 2009, 15:31

I cant post links here I dunno why, board script doesn't lemme throught.

chactory.de/ownloads/spampoints.zip right? if yes I will check it throught few next days.

Concerning my spam emails, they come from many hosts pc-114-102-162-190.cm.vtr.net,
c9522df7.virtua.com . br etc. Anyway most of those cases could be solved if my mail server would be patched properly, because most of them contain:

From: "Kaanxmjgrm" <hansatan@hansatan.com>
Envelope-to: hansatan@hansatan.com

(my own e-mail address as sender)...

I need to talk with server admin :)

BTW

What do you think about following priority list:

2009-02-21_144126.jpg
2009-02-21_144126.jpg (13.9 KiB) 1719-mal betrachtet


Is it fine? And 1x thing, url filter = link filter right ?
Benutzeravatar
HanSatan
Spam-Jäger
Spam-Jäger
 
Beiträge: 24
Registriert: 21. Feb 2009, 15:26
Wohnort: Poland

Re: Specific regular exp. creating

Beitragvon Chactory » 21. Feb 2009, 16:29

Hi,

excuse me, the hyperlink is http://www.chactory.de/downloads/spampoints.zip, of course. The board likes it more, when you use BBCode to post hyperlinks: spampoints.ini.

Thank you for testing my spampoints.ini in the next days.

The cm.vtr.net server seems to be in Chile, the virtua.com is registered in Connecticut, US ...
HanSatan hat geschrieben:(my own e-mail address as sender)... I need to talk with server admin :)
:lol:

Regards, Chactory
Vostro 3450, Intel Core i5 2410M 2,3 GHz, 4 GB DDR3 SDRAM 1333 MHz, Windows 7 Pro 64 Bit SP1
Online-Hilfe: «DE» − Chactory's Tipps: «DE» − Anbuva's FAQ: «DE» und «EN» − Bob Loefflers FAQ: «EN»

Bild
Benutzeravatar
Chactory
Administrator
Administrator
 
Administration
Beta-Tester
Forum-Team
 
Beiträge: 8677
Registriert: 10. Jan 2004, 00:19
Wohnort: Kiel (D)

Re: Specific regular exp. creating

Beitragvon Chactory » 21. Feb 2009, 17:09

Hi,
my filter sequence is rather akin to your's. I just don't use the attachment filter. The AIR Filter caused false positive sieving with me, because in my company, there are listed similar mail addresses in non-spam mails often.
Yes, the Link Filter works as an url filter. I'm really enthusiastic about it!
You may want to try the DCC Filter. When you enter a higher threshold than default (I'm using 1200), then you won't achieve false positives often.
Regards, Chactory

Bild
Vostro 3450, Intel Core i5 2410M 2,3 GHz, 4 GB DDR3 SDRAM 1333 MHz, Windows 7 Pro 64 Bit SP1
Online-Hilfe: «DE» − Chactory's Tipps: «DE» − Anbuva's FAQ: «DE» und «EN» − Bob Loefflers FAQ: «EN»

Bild
Benutzeravatar
Chactory
Administrator
Administrator
 
Administration
Beta-Tester
Forum-Team
 
Beiträge: 8677
Registriert: 10. Jan 2004, 00:19
Wohnort: Kiel (D)

Re: Specific regular exp. creating

Beitragvon Quellcore » 21. Feb 2009, 18:33

HanSatan hat geschrieben:(?i)New\sYork,\sNY,\s[0123456789]{5,20}

But maybe there's some other (better way) to filter it out?

The number part iat the end could be cleaned up:
Code: Alles auswählen
(?i)New\sYork,\sNY,\s[0-9]{5}\D

This will require the ZIP Code part of your example to have exactly 5 digits.

Regards,
Quellcore
Intel Core i7-2700K Processor (@ 45*100 = 4500 MHz) on ASRock P67 Extreme4 Gen3 with 16GB G.SKILL Ripjaws X Series (4 x 4GB) 240-Pin DDR3 SDRAM DDR3 2133 (PC3 17000) Model F3-17000CL11Q-16GBXL (Timings 10-10-10-28 2T @ 1866 MHz)
SSD Samsung 128GB 2.5-inch SSD 830 Series (Desktop)
HDD WD Caviar® SE16 640 GB, SATA2, 16 MB Cache, 7200 RPM
ATI Radeon HD 5850 ASUS EAH5850/G/2DIS/1GD5

Win 7 Ultimate 64-Bit / ESET NOD32 Antivirus 5.0 / Firefox 12.0 / Thunderbird 12.0
Spamihilator 1.0.0
Benutzeravatar
Quellcore
Assistent
Assistent
 
Beta-Tester
 
Beiträge: 1683
Registriert: 8. Mai 2004, 14:03
Wohnort: Long Island / USA

Re: Specific regular exp. creating

Beitragvon HanSatan » 21. Feb 2009, 19:18

Indeed,

but lemme ask, why did you add \D in the end of the line ?

I checked it with regex coach but it doesn't seem to work with \D ;)
Benutzeravatar
HanSatan
Spam-Jäger
Spam-Jäger
 
Beiträge: 24
Registriert: 21. Feb 2009, 15:26
Wohnort: Poland

Re: Specific regular exp. creating

Beitragvon Quellcore » 21. Feb 2009, 19:32

Hallo HanSatan!

I also tried it with Regex Coach and here it works (EDIT: if it's not at the very end of the searched string).
"/D" stands for any Non-Digit, without that the Regular expression would also kick in for "New York, NY, 123456"
Sorry, it looks like it doesn't work at the very end of a text.
Try
Code: Alles auswählen
(?i)New\sYork,\sNY,\s[0-9]{5}\b
instead.


Regards,
Quellcore
Intel Core i7-2700K Processor (@ 45*100 = 4500 MHz) on ASRock P67 Extreme4 Gen3 with 16GB G.SKILL Ripjaws X Series (4 x 4GB) 240-Pin DDR3 SDRAM DDR3 2133 (PC3 17000) Model F3-17000CL11Q-16GBXL (Timings 10-10-10-28 2T @ 1866 MHz)
SSD Samsung 128GB 2.5-inch SSD 830 Series (Desktop)
HDD WD Caviar® SE16 640 GB, SATA2, 16 MB Cache, 7200 RPM
ATI Radeon HD 5850 ASUS EAH5850/G/2DIS/1GD5

Win 7 Ultimate 64-Bit / ESET NOD32 Antivirus 5.0 / Firefox 12.0 / Thunderbird 12.0
Spamihilator 1.0.0
Benutzeravatar
Quellcore
Assistent
Assistent
 
Beta-Tester
 
Beiträge: 1683
Registriert: 8. Mai 2004, 14:03
Wohnort: Long Island / USA

Re: Specific regular exp. creating

Beitragvon HanSatan » 21. Feb 2009, 19:39

Thanks for support Quellcore.

Tell me 1x thing, if I would like to disable lines like "knock here" or "click here" can I use such a reg exp:

Code: Alles auswählen
(?i).\shere

Yes I know that it will also remove "same here",

or maybe

Code: Alles auswählen
(?i)(knock)?(click)?\shere

Or maybe some other ideas/suggestions?
Benutzeravatar
HanSatan
Spam-Jäger
Spam-Jäger
 
Beiträge: 24
Registriert: 21. Feb 2009, 15:26
Wohnort: Poland

Re: Specific regular exp. creating

Beitragvon Quellcore » 21. Feb 2009, 19:49

HanSatan hat geschrieben:Tell me 1x thing, if I would like to disable lines like "knock here" or "click here"

How about:
Code: Alles auswählen
(?i)(knock|click)\shere\b


Regards,
Quellcore
Intel Core i7-2700K Processor (@ 45*100 = 4500 MHz) on ASRock P67 Extreme4 Gen3 with 16GB G.SKILL Ripjaws X Series (4 x 4GB) 240-Pin DDR3 SDRAM DDR3 2133 (PC3 17000) Model F3-17000CL11Q-16GBXL (Timings 10-10-10-28 2T @ 1866 MHz)
SSD Samsung 128GB 2.5-inch SSD 830 Series (Desktop)
HDD WD Caviar® SE16 640 GB, SATA2, 16 MB Cache, 7200 RPM
ATI Radeon HD 5850 ASUS EAH5850/G/2DIS/1GD5

Win 7 Ultimate 64-Bit / ESET NOD32 Antivirus 5.0 / Firefox 12.0 / Thunderbird 12.0
Spamihilator 1.0.0
Benutzeravatar
Quellcore
Assistent
Assistent
 
Beta-Tester
 
Beiträge: 1683
Registriert: 8. Mai 2004, 14:03
Wohnort: Long Island / USA

Re: Specific regular exp. creating

Beitragvon HanSatan » 21. Feb 2009, 19:55

Thanks a lot,

it seems to match perfectly !

I got a 1x question ( I know I know I'm buggy) :D

I would like to filter out "beding" word but I don't want to filter "bed" word, so how should I set reg exp?

smthing like this:

Code: Alles auswählen
\bbed(ing)\b


or maybe there is other, better way with "." sign ??
Benutzeravatar
HanSatan
Spam-Jäger
Spam-Jäger
 
Beiträge: 24
Registriert: 21. Feb 2009, 15:26
Wohnort: Poland

Nächste

Zurück zu English Forum

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 0 Gäste

 industrious-southeast