no spaces in subject

For all users, who don't speak German!

Moderator: Forum-Team

no spaces in subject

Beitragvon hsfrey » 8. Jun 2010, 02: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, 02:36

Re: no spaces in subject

Beitragvon Quellcore » 8. Jun 2010, 04: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
AMD Athlon™ X2 Dual-Core BE-2400 (@ 11,5*261 = 3001 MHz) auf Biostar TF560 A2+
2x 2GB G.SKILL F2-8500CL5D-4GBPK (Timings 5-5-5-18 2T @ 500 MHz Dual Channel)
WD Caviar® SE16 640 GB, SATA2, 16 MB Cache, 7200 RPM / ASUS EAH5850/G/2DIS/1GD5

Win XP Pro / Avira AntiVir 10 Personal / Firefox 3.6.6 / Thunderbird 3.1
Spamihilator 0.9.9.53
Benutzeravatar
Quellcore
Assistent
Assistent
 
Beta-Tester
 
Beiträge: 1472
Registriert: 8. Mai 2004, 14:03
Wohnort: Long Island / USA

Re: no spaces in subject

Beitragvon hsfrey » 8. Jun 2010, 04: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, 02:36

Re: no spaces in subject

Beitragvon Quellcore » 9. Jun 2010, 02: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
AMD Athlon™ X2 Dual-Core BE-2400 (@ 11,5*261 = 3001 MHz) auf Biostar TF560 A2+
2x 2GB G.SKILL F2-8500CL5D-4GBPK (Timings 5-5-5-18 2T @ 500 MHz Dual Channel)
WD Caviar® SE16 640 GB, SATA2, 16 MB Cache, 7200 RPM / ASUS EAH5850/G/2DIS/1GD5

Win XP Pro / Avira AntiVir 10 Personal / Firefox 3.6.6 / Thunderbird 3.1
Spamihilator 0.9.9.53
Benutzeravatar
Quellcore
Assistent
Assistent
 
Beta-Tester
 
Beiträge: 1472
Registriert: 8. Mai 2004, 14:03
Wohnort: Long Island / USA


Zurück zu English Forum

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast

cron

 industrious-southeast