<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>Spam Filter ISP Forums : Help with multiple RegEx search strings and using </title>
  <link>https://www.logsat.com/spamfilter/forums/</link>
  <description><![CDATA[This is an XML content feed of; Spam Filter ISP Forums : Spam Filter ISP Support : Help with multiple RegEx search strings and using ]]></description>
  <pubDate>Sun, 10 May 2026 07:50:31 +0000</pubDate>
  <lastBuildDate>Mon, 03 Jan 2005 17:56:00 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 11.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>https://www.logsat.com/spamfilter/forums/RSS_post_feed.asp?TID=4869</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Spam Filter ISP Forums]]></title>
   <url>https://www.logsat.com/spamfilter/forums/forum_images/web_wiz_forums.png</url>
   <link>https://www.logsat.com/spamfilter/forums/</link>
  </image>
  <item>
   <title><![CDATA[Help with multiple RegEx search strings and using  : Dan or Roberto, What RegEx would...]]></title>
   <link>https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=4869&amp;PID=4930&amp;title=help-with-multiple-regex-search-strings-and-using#4930</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://www.logsat.com/spamfilter/forums/member_profile.asp?PF=14">CyberBob</a><br /><strong>Subject:</strong> 4869<br /><strong>Posted:</strong> 03 January 2005 at 5:56pm<br /><br /><P>Dan or Roberto,</P><P>What RegEx would you use to replace a comma in the fashion I'm trying to use it to "AND" two "expressions" or keywords together in an email?</P><P>I'd love to use (\s*) between each letter of mortgage but using the * will also block the actual word "mortgage."</P><P>So I need to combine a couple keywords like </P><P>approved,((m(\s*)o(\s*)r(\s*)t(\s*)g(\s*)a(\s*)g(\s*)e))</P><P>What would you use to replace the comma?</P><P>Thanks in advance,</P><P>Bob</P>]]>
   </description>
   <pubDate>Mon, 03 Jan 2005 17:56:00 +0000</pubDate>
   <guid isPermaLink="true">https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=4869&amp;PID=4930&amp;title=help-with-multiple-regex-search-strings-and-using#4930</guid>
  </item> 
  <item>
   <title><![CDATA[Help with multiple RegEx search strings and using  : Ok guys thanks for the feedback...]]></title>
   <link>https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=4869&amp;PID=4924&amp;title=help-with-multiple-regex-search-strings-and-using#4924</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://www.logsat.com/spamfilter/forums/member_profile.asp?PF=14">CyberBob</a><br /><strong>Subject:</strong> 4869<br /><strong>Posted:</strong> 03 January 2005 at 11:56am<br /><br /><P>Ok guys thanks for the feedback but through this process I've figured out how to make it work. I have multiple Regex rules separated by comma's including some plain words and it appears to be working and becoming one of my top rules in my "Top Keywords" report.</P><P>Let me monitor this for the next week or so and I'll report back as it appears to be a very powerful way to use RegEx&nbsp;multiple times in complicated&nbsp;rules.</P><P>Bob</P>]]>
   </description>
   <pubDate>Mon, 03 Jan 2005 11:56:00 +0000</pubDate>
   <guid isPermaLink="true">https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=4869&amp;PID=4924&amp;title=help-with-multiple-regex-search-strings-and-using#4924</guid>
  </item> 
  <item>
   <title><![CDATA[Help with multiple RegEx search strings and using  : Bob,Dan is correct. Please see...]]></title>
   <link>https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=4869&amp;PID=4922&amp;title=help-with-multiple-regex-search-strings-and-using#4922</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://www.logsat.com/spamfilter/forums/member_profile.asp?PF=8">LogSat</a><br /><strong>Subject:</strong> 4869<br /><strong>Posted:</strong> 02 January 2005 at 11:16pm<br /><br />Bob,<P CLASS="ASPForums"></P>Dan is correct. Please see <A HREF="http://www.logsat.com/spamfilter/forums/showmessage.asp?messageID=4921" CLASS="ASPForums" TITLE="WARNING: URL created by poster. ">http://www.logsat.com/spamfilter/forums/showmessage.asp?messageID=4921</A> for a confirmation.<P CLASS="ASPForums"></P>Roberto F.LogSat Software]]>
   </description>
   <pubDate>Sun, 02 Jan 2005 23:16:00 +0000</pubDate>
   <guid isPermaLink="true">https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=4869&amp;PID=4922&amp;title=help-with-multiple-regex-search-strings-and-using#4922</guid>
  </item> 
  <item>
   <title><![CDATA[Help with multiple RegEx search strings and using  : Dan,That was a good call, the...]]></title>
   <link>https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=4869&amp;PID=4921&amp;title=help-with-multiple-regex-search-strings-and-using#4921</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://www.logsat.com/spamfilter/forums/member_profile.asp?PF=8">LogSat</a><br /><strong>Subject:</strong> 4869<br /><strong>Posted:</strong> 02 January 2005 at 11:14pm<br /><br />Dan,<P CLASS="ASPForums"></P>That was a good call, the comma in a RegEx *will* be interpreted as a literal, it cannot be used to "and" two expressions. RegEx is as powerful as it is complicated, so we did that by design as with RegEx it should usually be possible to construct an expression such as to obtain what is required "and-ing" two or more expressions.<P CLASS="ASPForums"></P>Roberto F.LogSat Software]]>
   </description>
   <pubDate>Sun, 02 Jan 2005 23:14:00 +0000</pubDate>
   <guid isPermaLink="true">https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=4869&amp;PID=4921&amp;title=help-with-multiple-regex-search-strings-and-using#4921</guid>
  </item> 
  <item>
   <title><![CDATA[Help with multiple RegEx search strings and using  : Roberto, Can you give us some...]]></title>
   <link>https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=4869&amp;PID=4915&amp;title=help-with-multiple-regex-search-strings-and-using#4915</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://www.logsat.com/spamfilter/forums/member_profile.asp?PF=14">CyberBob</a><br /><strong>Subject:</strong> 4869<br /><strong>Posted:</strong> 31 December 2004 at 11:36am<br /><br /><P>Roberto,</P><P>Can you give us some input here? I think Dan is saying the same this as me but clarify:</P><P>Is it ok to use comma's when seprating keywords EXCEPT when you use RegEx on both sides of the comma?</P><P>This is one of my top rules and obviously it's working well:</P><P>((?i)cheap|online,(d(\^|\s|-|\.*)r(\^|\s|-|\.*)u(\^|\s|-|\.*)g(\^|\s|-|\.*)s))</P><P>This rule first finds cheap or online THEN looks for any variation of the word "drug" </P><P>d r u g</P><P>d.r.u.g</P><P>d-r-u-g</P><P>or any variation</P><P>d.r u-g</P><P>But as soon as I try to add any RegEx to the "cheap or online" the rule stops working?</P><P>I'm still doing some testing and I think this will work but I'm not getting my escape brackets in the correct spot or enough/too many&nbsp;of them.</P><P>I'll post more as I find more but Roberto may have some better insight for us?</P>]]>
   </description>
   <pubDate>Fri, 31 Dec 2004 11:36:00 +0000</pubDate>
   <guid isPermaLink="true">https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=4869&amp;PID=4915&amp;title=help-with-multiple-regex-search-strings-and-using#4915</guid>
  </item> 
  <item>
   <title><![CDATA[Help with multiple RegEx search strings and using  : I have been wrong before and I...]]></title>
   <link>https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=4869&amp;PID=4898&amp;title=help-with-multiple-regex-search-strings-and-using#4898</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://www.logsat.com/spamfilter/forums/member_profile.asp?PF=22">Desperado</a><br /><strong>Subject:</strong> 4869<br /><strong>Posted:</strong> 29 December 2004 at 12:14pm<br /><br /><FONT face=Arial size=2>I have been wrong before and I hope Roberto will correct me if I mis-state this but ... *do not* use commas.&nbsp; They will be treated as literal commas and will not have the effect you think.&nbsp; Also, The SpamFilter implementation of RegEx can not "look ahead" so the "AND" function is not valid.&nbsp; What this means is that you can find 2 words in a message using a variety of ways to separate them but *only* in the order they are presented in the expression.<BR><BR>An additional issue is, if the expression is written to look for 2 words separated by too many characters, the expression may fail with a "Loop Stack Exceeded" error.&nbsp; Search your logs for "String Match" and you will locate any RegEx's that are failing.&nbsp; Often, however, a RegEx works in some cases but causes a "Loop Stack Exceeded" error in others.&nbsp;&nbsp; In fact, I just spent many hours "adjusting" 2 expressions that were causing that error way too often.&nbsp; I feel that it is probably a good idea to limit the "Search Scope" of an expression to avoid those errors as with the expression example below:<BR><BR>((?i)Subject:((&#091;\s&#093;|&#091;\!-\xB4&#093;){0,10}&#091;\|&#093;){2})<BR><BR>I would prefer to *not* use the "{0,10} clause but if I don't, I get many failures.<BR><BR>BTW, if anyone has a less complex way of doing the above RELIABLY, please chime in.&nbsp; This expression very simply catches any instance of 2 or more "Pipe" characters anywhere in the subject even if the pipes are separated by any of the first 115 ASCII characters.<BR><BR>Dan S.</FONT><BR>]]>
   </description>
   <pubDate>Wed, 29 Dec 2004 12:14:00 +0000</pubDate>
   <guid isPermaLink="true">https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=4869&amp;PID=4898&amp;title=help-with-multiple-regex-search-strings-and-using#4898</guid>
  </item> 
  <item>
   <title><![CDATA[Help with multiple RegEx search strings and using  : Now we are on the same wave length...]]></title>
   <link>https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=4869&amp;PID=4897&amp;title=help-with-multiple-regex-search-strings-and-using#4897</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://www.logsat.com/spamfilter/forums/member_profile.asp?PF=14">CyberBob</a><br /><strong>Subject:</strong> 4869<br /><strong>Posted:</strong> 29 December 2004 at 11:44am<br /><br /><P>Now we are on the same wave length and I wonder if this is the problem. You use comma's to separate keywords you want the filter to find anywhere in the email body. This is a function of SpamFilter coding not RegEx. </P><P>So the Million dollar question :-) that I'm trying to get to:</P><P>Can you use two different&nbsp;RegEx rules on the same line AND separate them by comma's so the rule will find&nbsp;two keywords in an email?</P><P>Does this help?</P>]]>
   </description>
   <pubDate>Wed, 29 Dec 2004 11:44:00 +0000</pubDate>
   <guid isPermaLink="true">https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=4869&amp;PID=4897&amp;title=help-with-multiple-regex-search-strings-and-using#4897</guid>
  </item> 
  <item>
   <title><![CDATA[Help with multiple RegEx search strings and using  : First, whats with the commas?...]]></title>
   <link>https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=4869&amp;PID=4895&amp;title=help-with-multiple-regex-search-strings-and-using#4895</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://www.logsat.com/spamfilter/forums/member_profile.asp?PF=22">Desperado</a><br /><strong>Subject:</strong> 4869<br /><strong>Posted:</strong> 29 December 2004 at 11:31am<br /><br /><P>First, whats with the commas?&nbsp; I do not think you want any commas in your RegEx's</P><P>Let's start there and I will look at your expressions early this afternoon.</P><P>Dan</P><P>&nbsp;</P>]]>
   </description>
   <pubDate>Wed, 29 Dec 2004 11:31:00 +0000</pubDate>
   <guid isPermaLink="true">https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=4869&amp;PID=4895&amp;title=help-with-multiple-regex-search-strings-and-using#4895</guid>
  </item> 
  <item>
   <title><![CDATA[Help with multiple RegEx search strings and using  : Sorry for my rambling I think...]]></title>
   <link>https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=4869&amp;PID=4893&amp;title=help-with-multiple-regex-search-strings-and-using#4893</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://www.logsat.com/spamfilter/forums/member_profile.asp?PF=14">CyberBob</a><br /><strong>Subject:</strong> 4869<br /><strong>Posted:</strong> 29 December 2004 at 11:07am<br /><br /><P>Sorry for my rambling I think I'm getting close to an answer but here's another way to say it.</P><P>Say we are going to block "online drugs" we add:</P><P>online,drugs </P><P>to the keyword list but we also need the variations using cheap drugs and online pharmacy so it now would read</P><P>cheap|online,drugs|pharmacy or we could use brackets</P><P>(cheap|online),(drugs|pharmacy) now if I wanted to look for upper/lower case</P><P>((?i)(cheap|online),(drugs|pharmacy)) </P><P>At this point everything is ok but if we take to the next level and block anyone putting a space or hypen between letters then I start getting string errors. I'll just use one word to as an example so this doesn't get too long</P><P>((?i)(c(s|-*)h(s|-*)e(s|-*)a(s|-*)p|online),(drugs|pharmacy))</P><P>When I do this I start getting string errors in my log and I'm pretty sure I'm not using the proper amount of brackets in the correct places?</P><P>Once I start adding (s|-*) between the letters of "cheap" do I need another set of brackets to enclose the word and then another set to enclose "cheap|online" ????</P><P>So back to my original post I have found this to work well between letters</P><P>(s|-*) as it will look for zero or more of both space and hypen but you have to be careful with it, if you put this in your keywords by itself </P><P>c(s|-*)h(s|-*)e(s|-*)a(s|-*)p</P><P>it will not only block any variation of "c h e A p" or "c-h-e-a-p" but it will also block the plain word "cheap" and now you have people upset with you.</P><P>So I tried to use this rule with "|" and "," to put more keywords together and that's where my troubles started.</P><P>Sorry for the long post but I hope this makes more sense.</P><P>Thanks,</P><P>Bob </P>]]>
   </description>
   <pubDate>Wed, 29 Dec 2004 11:07:00 +0000</pubDate>
   <guid isPermaLink="true">https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=4869&amp;PID=4893&amp;title=help-with-multiple-regex-search-strings-and-using#4893</guid>
  </item> 
  <item>
   <title><![CDATA[Help with multiple RegEx search strings and using  : Hmmm ... I am slightly confused....]]></title>
   <link>https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=4869&amp;PID=4873&amp;title=help-with-multiple-regex-search-strings-and-using#4873</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://www.logsat.com/spamfilter/forums/member_profile.asp?PF=22">Desperado</a><br /><strong>Subject:</strong> 4869<br /><strong>Posted:</strong> 28 December 2004 at 11:30am<br /><br /><P>Hmmm ... I am slightly confused.&nbsp; EXACTLY what do you want blocked and *not* want blocked?</P><P>As an example: ((?i)((b.o.b)))&nbsp;&nbsp; Will block B O B and b-o b etc but not Bob.</P><P>Is this the sort of thing you are looking for?</P><P>WARNING ... this will also block baoab (not that that is a word!)</P><P>Dan S.</P>]]>
   </description>
   <pubDate>Tue, 28 Dec 2004 11:30:00 +0000</pubDate>
   <guid isPermaLink="true">https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=4869&amp;PID=4873&amp;title=help-with-multiple-regex-search-strings-and-using#4873</guid>
  </item> 
 </channel>
</rss>