Hi Raj,
On 31 July 2001 at 09:02:56 +0530 (which was 04:32 where I live) Raj
wrote to [EMAIL PROTECTED] and made these points:
>> In this template put:
>> %SETPATTREGEXP="(?is)^A1\:\s*\<?(\S*?)(\s+(\S*?))*?\>?$"%-
>> %REGEXPMATCH="%TEXT"
Okay. The above macro is place into a new Quick Template. That QT is
given the name "Form-FirstName". The macro uses a "simple" regular
expression which breaks down as follows:
(?is)
Set the Regular Expression internal options to match case insensitive
(i) and include NewLine sequences (s) when matching using a '.' to
match.
^
The matched string must start at the beginning of a line.
A1\:
Look for the literal string 'A1:' (since : is a special character, it
is given a "literal" prefix of a '\' to override any special meaning)
\s*
Match one (or more) white space characters.
\<?
Match zero or one literal '<' characters.
(\S*?)
The brackets here denote the first captured sub-pattern. It consists
of zero or more (*) non-space (\S) characters. To be honest the '?'
(zero or one) specifier here is a bit confusing... but it works.
(\s+(\S*?))*?
Here's sub-pattern 2. It is one or more (+) white space characters
(\s) followed by zero or more non-space characters (as above). Again,
another '?' which I'm not sure about ... Januk? And then the whole
pattern is repeated zero or more times (*) with another zero or one
(?) specifier to cap it off.
\>?$
Finally match zero or one literal '>' characters at the end of the
line ($).
%REGEXPMATCH="%TEXT"
This brings the original text of the message to which a reply is being
generated into focus at the text to be used for the regular expression
matching operation.
>> In your the template where you make the salutation, when you want
>> the name, just insert: %QINCLUDE="Form-FirstName"
>> Put this one in a quick template called "Form-E-mail"
>> %SETPATTREGEXP=(?is)^A3\:\s*\<?(\S*?)\>?"%-
>> %REGEXPMATCH="%TEXT"
This is the same as above except that it matches and extracts text
from a line beginning with 'A3:'
--
Cheers -- .\\arck D. Pearlstone -- List moderator and fellow end user
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\ BrainStorm - free thinking - www: http://www.brainstormsw.com /
\ PGP Key ID: 0x929DCDA0 | www: http://www.silverstones.com /
TB! v1.54 Beta/414F4B4B2 on Windows NT 5.0.2195 Service Pack 1
--
______________________________________________________
Archives : <http://tbtech.thebat.dutaint.com>
Moderators : <mailto:[EMAIL PROTECTED]>
Unsubscribe: <mailto:[EMAIL PROTECTED]>