Sticking with what we built in part one (which can be found here) Dell Inspiron 1300 Battery, weve found a common theme in the spam we receive with variations on the following subject line �C Viagra is sold here for cheap.
V1@gra is sold here for ch3ap V hp pavilion dv5000 Battery!agra 1s sold h3r3 for cheap V Ibm Thinkpad X30 Battery!@gra sold here for cheapThe final regular expression we built was ^v.{2}gra\ .*?\ sold\ h\w{1}r\w{1}\ for\ ch\w{1}ap$.
RegexBuilder
After youve got a regular expression, youll want to test it against possible variations in the spam you receive. Youll want to grab RegexBuilder. This tool allows you to enter a regular expression and some test text and it will very clearly tell you if your test text would match the expression. RegexBuilder can be found here.
In order to use RegexBuilder, youll need to have the Microsoft .NET Framework 2.0 installed �C available here.
Testing Regular Expressions using RegexBuilder
1. Fire up RegexBuilder
2. Copy the regular expression we created into the Regex text field
3. Copy each of the tests into the Text 1 and Text 2 fields. Click the + button to add a Text 3 field.
4. As you type each in, the first three should turn green noting that these zxcsky32645 three tests match our regular expression. Note that V!@gra sold here for cheap doesnt match out regular expression though. See Figure 1.
5. You can keep adding test text to see if other spam variations will match the regular expression.
6. In order to fix the expression for the failed test, we can go back to Regulazy or modify the expression in RegexBuilder itself.
Adding the Regular Expression to your Filter
Each Anti-SPAM application will be different dell vostro 2510 battery, but most advanced consumer and Enterprise filters will allow for the use of Regular Expressions. One of my top FREE Anti-SPAM tools for home use �C Spamihilator (discussed here) supports Regular Expressions. This section will give you a quick rundown of how to add your newly created RegEx into Spamihilator. Refer to your tools user manual to determine if it supports Regex.
1. Start Spamihilator. Right click on the Spamihilator icon in your taskbar and select Settings.
2. Click on Spam Words
3. Click Add
4. Copy your regular expression into the text field and be sure to check the Regular Expression checkbox. See Figure 2.
5. Click Ok and then Apply.
Thats it �C Spamihilator (or your filter of choosing) will now block our example text.
Images
没有评论:
发表评论