On  Tue, 21 Nov 2000  at  19:25:31 GMT -0800 (which was 7:25 PM
where I live) witnesses say Januk Aggarwal typed:

> Gives:
>   [EMAIL PROTECTED]>
>                              ^
> Except for the trailing > this is very close to what we want.  Any
> ideas how to remove this last problem?

At last the problem has been solved.  Here is what seems to work for
me.  Try it on your system, and see if it does what you need:

The following regular expression will extract the first e-mail address
in your message body.  Note there must be at least 2 characters before
the @ symbol, and at least 4 characters after.

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

This does not guarantee that a valid address will be returned, but it
seems to be fairly resistant to things like examples of regular
expressions. Try it when replying to this message.  The message I'm
replying to has a bunch of regexps with a bunch of @ symbols
everywhere.  The output of the above macro on the body of the message
I'm replying to is:  [EMAIL PROTECTED]

Again, to put the output in the To field, use:

%TO=''%TO='regexp'

where regexp is replaced by that long line above.

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

 Using The Bat! 1.48 Beta/7
 under Windows 98 4.10 Build 2222  A 

-- 
--------------------------------------------------------------
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