Hello Manfred,

On  Mon, 4 Dec 2000  at  22:05:28 GMT +0000 (which was 2:05 PM
where I live) witnesses say Manfred Ell typed:



> I have used the following regexp from a previous thread to extract the
> email (putting it in a template or directly in the auto-reply filter):

> 
>%TO=''%TO='%SETPATTREGEXP='(?is)(.*?)\s(.*?:)*?(\S{1,}?\w@\w\S{3,}?)(\>|\s|\n)'%REGEXPBLINDMATCH="%TEXT"%SUBPATT="3"'

> When the filter executes TheBat bombs with an exception error.
> The above regexp extracts the email fine and inserts it correctly in the
> message body but inserting it in the TO field (as above) bombs.

It looks like you have a typo that could be causing your problem.  You
need to double up the single quotes associated with %SETPATTREGEXP or
change those quotes to double quotes.  The way you have it, the
argument to %TO is
   %SETPATTREGEXP=
The %SETPATTREGEXP macro is expecting arguments, but you are not
providing any.

BTW, I had come up with a more general and less error prone regular expression
than the one you have. Try cutting and pasting it into your template
and see if it helps.

<one line>
%TO=''%TO='%SETPATTREGEXP="(?is).*?[^-_.\w]*([-_.\w]{2,}@[-_.\w]{3,})[^-_.\w]"%REGEXPBLINDMATCH="%TEXT"%SUBPATT="1"'
</one line>

If you have this correct in your template and still get the error,
then perhaps the error is caused by your testing method.  When I was
developing the macro initially, I got an exception error if I tried to
send myself a message to trigger the filter with Local Delivery
enabled.  Turning off Local Delivery made the difference.  If you make
a quick template with just this macro and you apply it manually to a
message, does it work properly?  When I try it manually, the To line
is replaced correctly.

How are you testing the filter/template combination?  Do your test
messages have an address in the body that match the search criteria?

First thing to do is to replace the macro you have with the one I've
pasted in above.  If that doesn't help, turn off Local delivery.  If
that doesn't help or is not applicable, check out some of the other
things mentioned.

Good luck!

-- 
Thanks for writing,
 Januk Aggarwal
 See header for e-mail address

 Using The Bat! 1.48 Beta/9
 under Windows 98 4.10 Build 2222  A 
 on a PIII 550MHz with 192 MB RAM

-- 
--------------------------------------------------------------
View the TBUDL archive at http://tbudl.thebat.dutaint.com
To send a message to the list moderation team double click here:
   <mailto:[EMAIL PROTECTED]>
To Unsubscribe from TBUDL, double click here and send the message:
   <mailto:[EMAIL PROTECTED]>
--------------------------------------------------------------

You are subscribed as : archive@jab.org


Reply via email to