no spaces in subject

For all users, who don't speak German!

Moderator: Forum-Team

no spaces in subject

Beitragvon hsfrey » 8. Jun 2010, 01:53

I'm getting drug spams with all the subject line letters run together and no spaces (kind of like German :lol: ).
They aren't recognized as spam.

Does anyone have any suggestions about how to write a regex to recognize a string over (say) 20 characters with no space characters?

I could probably do it if I could write a few lines of javascript, but I understand that the rule has to be one regex. Is that right?
hsfrey
User
User
 
Beiträge: 2
Registriert: 8. Jun 2010, 01:36

Re: no spaces in subject

Beitragvon Quellcore » 8. Jun 2010, 03:13

Hello hsfrey!

This one should work:
Code: Alles auswählen
\w{20,}


But it sounds pretty risky to me, asking for false positives.

Regards,
Quellcore
CPU:Intel Core i7-2700K Processor (@ 45*100 = 4500 MHz)
Board:ASRock P67 Extreme4 Gen3
Ram: 16GB G.SKILL Ripjaws X Series (4 x 4GB) DDR3 2133 (Timings 10-10-10-28 2T @ 1866 MHz)
SSD: Samsung 128GB 2.5-inch SSD 830 Series (Desktop)
HDD-1: WD Caviar® SE16 640 GB, SATA2, 16 MB Cache, 7200 RPM
HDD-2: SAMSUNG EcoGreen F4 ST2000DL004 2TB 32MB Cache
Graphic: ATI Radeon HD 5850 ASUS EAH5850/G/2DIS/1GD5

Win 7 Ultimate 64-Bit / ESET NOD32 Antivirus 8.0 / Firefox 34 / Thunderbird 31
Spamihilator 1.6.0
Benutzeravatar
Quellcore
Assistent
Assistent
 
Beta-Tester
 
Beiträge: 1706
Registriert: 8. Mai 2004, 13:03
Wohnort: Long Island / USA

Re: no spaces in subject

Beitragvon hsfrey » 8. Jun 2010, 03:25

Thanks Quellcore:

Regexes always seem so obvious when someone else figures them out. :D

As for false positives, I doubt that, at least in English, I would be likely to have a word 20 characters long.

And if it did, wouldn't it end up in my training area where I could catch it?
hsfrey
User
User
 
Beiträge: 2
Registriert: 8. Jun 2010, 01:36

Re: no spaces in subject

Beitragvon Quellcore » 9. Jun 2010, 01:27

hsfrey hat geschrieben:And if it did, wouldn't it end up in my training area where I could catch it?

Correct, no problem then ;-)
Could you give me an example of one of those long strings :?:
Do those spam specific long strings contain only letters or also numbers :?:
How about all the special characters like !@#$%^&*()-_=+{}[]\|;':",>,./?
If you want to allow any non whitespace (= anything but whitespaces) character to be part of the long spam word this might be the better expression:
\S{20,}

Please note the captial 'S', it has a different meaning than the non capital 's''.

Regards,
Quellcore
CPU:Intel Core i7-2700K Processor (@ 45*100 = 4500 MHz)
Board:ASRock P67 Extreme4 Gen3
Ram: 16GB G.SKILL Ripjaws X Series (4 x 4GB) DDR3 2133 (Timings 10-10-10-28 2T @ 1866 MHz)
SSD: Samsung 128GB 2.5-inch SSD 830 Series (Desktop)
HDD-1: WD Caviar® SE16 640 GB, SATA2, 16 MB Cache, 7200 RPM
HDD-2: SAMSUNG EcoGreen F4 ST2000DL004 2TB 32MB Cache
Graphic: ATI Radeon HD 5850 ASUS EAH5850/G/2DIS/1GD5

Win 7 Ultimate 64-Bit / ESET NOD32 Antivirus 8.0 / Firefox 34 / Thunderbird 31
Spamihilator 1.6.0
Benutzeravatar
Quellcore
Assistent
Assistent
 
Beta-Tester
 
Beiträge: 1706
Registriert: 8. Mai 2004, 13:03
Wohnort: Long Island / USA


Zurück zu English Forum

Wer ist online?

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

cron

 industrious-southeast