Michael L. Wilson wrote:

MLW> I wish to make a filter that will catch the word "ball" in the
MLW> subject.  I want it to not depend on case.

Regular expressions in filters seem to ignore case by default, for me
anyway.  IAE, you can explicitly set case sensitivity for regular
expressions.  Use "(?i)" to force a case insensitive match, "(?-i)" to
match case.  For example:

(?i)ball

matches "ball", "BALL" or "BalL".

(?-i)BALL

only matches on "BALL" (or "BALLET", "BALLISTIC", etc.).  To restrict the
match to a word, you could use:

(?-i)\bBALL\b

MLW> Is the best way to use "match on any" and have all my words in regular
MLW> expressions like [Bb][Aa][Ll][Ll]?

You could use "match on any" with each expression on its own line:

(?i)sig
(?-i)TOO
(?i)long

or, if you want all matches to be case insensitive, you could match on a
single expression:

(?i)sig|too|long

I don't know if one is more efficient than the other.  The first is
probably easier to read/edit.

Standard text matching might be case insensitive as well; play with
it.  The nice thing about regular expressions is that for a bit of
added complexity you can be as precise as you need.

-- 
George

Using The Rat! 3.0.1.33 on Windows XP Pro 5.1, Build 2600, Service Pack 2.


________________________________________________________
 Current beta is 3.0.2.1 Beta/1 | 'Using TBBETA' information:
http://www.silverstones.com/thebat/TBUDLInfo.html
IMPORTANT: To register as a Beta tester, use this link first -
http://www.ritlabs.com/en/partners/testers/

Reply via email to