Hello Lars, On Monday, November 19, 2001 at 08:56 GMT +0100, a creature mimicking Lars Geiger [LG] wrote:
<snip, moved to end> LG> But if I test the following QT (in a reply, of course) it outputs an LG> error "*** Error: range out of order in character class ***" Problem is you're trying to use the wrong syntax for the X-Mailer or User-Agent choice. The square brackets mark a list of characters you want to choose from. In this context, the '-' character indicates a range of characters. Since 'X' is after 'M' and 'r' is after 'A', you are specifying invalid ranges. To correct it, you must use something like: %SETPATTREGEXP="(?im-s)^(X-Mailer|User-Agent)\:.*(Bat!|Becky|Gnus)" LG> Anyway, I just tried to track down the mistake in my logic and I just LG> seem to be unable to see the point. IIRC, %SETPATTREGEXP defines a LG> pattern and %REGEXPMATCH will return the first matched subpattern. %REGEXPMATCH will return subpattern 1 if it isn't empty, otherwise it will return subpattern 0. So even if the match doesn't detect one of the three mailers, the overall pattern should return something. In my corrected expression above, the subpattern of interest is subpattern 2. That means the final corrected version should be: %IF:'%- %SETPATTREGEXP="(?im-s)^(X-Mailer|User-Agent)\:.*(Bat!|Becky|Gnus)"%- %REGEXPBLINDMATCH="Headers"%- %SUBPATT="2"%- '='':'None':'I' -- Thanks for writing, Januk Aggarwal Using The Bat! 1.54/10 under Windows 98 4.10 Build 2222 A I was the next door kid's imaginary friend. -- ______________________________________________________ Archives : http://tbtech.thebat.dutaint.com Moderators : mailto:[EMAIL PROTECTED] Unsubscribe: mailto:[EMAIL PROTECTED]