<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title>www.ritlabs.com [Topic: regular expressions]</title>
		<link>http://www.ritlabs.com</link>
		<description>New posts in regular expressions of  forum at www.ritlabs.com [www.ritlabs.com]</description>
		<language>en</language>
		<docs>http://backend.userland.com/rss2</docs>
		<lastBuildDateTag>Mon, 29 Nov 2004 02:08:22 +0200</lastBuildDateTag>		<item>
			<title>regular expressions</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum5/topic219/message2501/">regular expressions</a></b> <i>spam filter using regular expressions</i> in forum <a href="http://www.ritlabs.com/en/forums/forum5/">The Bat! - Filters</a>. <br />
			<br />====quote====<br />Dan James wrote:<br />spam/5C[[7-9][0-9]/5C. [0-9]%/5C]\0D\0A} <br />=============<br />Okay, it's easy<br />you have one space in RE after dot<br />5C.&lt;space&gt;[0-9]<br /><br />Also - condition can be simplified to "match" from original "Mathes all as Regexp" (I tested and it works correctly)<br /><br />RE also can be shortened to smth. like<br />spam.[7-9]\d\.<br /> <br />
			<i>29 November 2004 02:08:22, <a href="http://www.ritlabs.com/en/forums/">Big Alex</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum5/topic219/message2501/</link>
			<guid>http://www.ritlabs.com/en/forums/forum5/topic219/message2501/</guid>
			<pubDate>Mon, 29 Nov 2004 02:08:22 +0200</pubDate>
			<category>The Bat! - Filters</category>
		</item>
		<item>
			<title>regular expressions</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum5/topic219/message726/">regular expressions</a></b> <i>spam filter using regular expressions</i> in forum <a href="http://www.ritlabs.com/en/forums/forum5/">The Bat! - Filters</a>. <br />
			I use K9 to evaluate mail and assign a spam percentage. &nbsp;K9 adds a line to the header such as <br />X-Text-Classification: spam[85.7%]<br />and under 2.x, I had a filter using a regular expression that deleted mail with a spam rating above 70% and moved other suspected spam to a check folder.<br /><br />With the 3.x filtering system, I haven't been able to compose a filter that handles regular expressions. &nbsp;I put my spam rules in the common filters.<br /><br />My first attempt was a rule that looks for the additional header line and checks the percentage:<br /><br />$$$$ TB! Message Filter $$$$<br />beginFilter<br />UID: [414B8310.01C491E0.64467605.2A6B661E]<br />Name: common\20X-Text-Classification:\20spam[70-100%]<br />Filter: {\0D\0A\20`5`15`X-Text-Classification:\20spam/5C[[7-9][0-9]/5C.[0-9]%/5C]\0D\0A}<br />Delete<br />IsActive<br />endFilter<br /><br />this hasn't worked, so I changed it to look for the specific header entry X-Text-Classification: and match the percentage just on that line<br /><br />$$$$ TB! Message Filter $$$$<br />beginFilter<br />UID: [414B8310.01C491E0.64467605.2A6B661E]<br />Name: common\201.X-Text-Classification:\20spam[70-100%]<br />Filter: {\0D\0A\20`7`X-Text-Classification`15`spam/5C[[7-9][0-9]/5C.[0-9]%/5C]\0D\0A}<br />Delete<br />IsActive<br />endFilter<br /><br />That hasn't worked either. &nbsp;My last resort rule does match, but puts every spam, regardless of the percentage into the junk folder.<br /><br />$$$$ TB! Message Filter $$$$<br />beginFilter<br />UID: [414B8310.01C491E0.59B4B898.7C7E7EFC]<br />Name: common\20X-Text-Classification:\20spam<br />Filter: {\0D\0A\20`5`2`X-Text-Classification:\20spam\0D\0A}<br />MoveMessage folder \5C\5C\5C$JUNK$<br />IsActive<br />endFilter<br /><br />Got any ideas on how I can get the regular expression to match the way I want it?<br /><br /><br /> <br />
			<i>09 October 2004 21:19:59, <a href="http://www.ritlabs.com/en/forums/">Dan James</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum5/topic219/message726/</link>
			<guid>http://www.ritlabs.com/en/forums/forum5/topic219/message726/</guid>
			<pubDate>Sat, 09 Oct 2004 21:19:59 +0300</pubDate>
			<category>The Bat! - Filters</category>
		</item>
	</channel>
</rss>
