-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Januk,

KM>> register_a_friend: Register A Friend
KM>> friends_name: Patti
KM>> friends_email: [EMAIL PROTECTED]
KM>> your_name: Sunny
KM>> your_email_address: [EMAIL PROTECTED]
KM>> Submit: Submit

KM>> What I want is a Quick Template that puts the "friends_email" into the
KM>> TO: box, the "friends_name" in the body after Hi ***** and the
KM>> referrers name "your_name" in the body.

JA> You need regular expressions.  They aren't hard, but they do have a
JA> steep learning curve.

JA> To extract the friend's name, use:
JA>    %RegExpText="(?im-s)^\s*friends_name:\s*(.*?)\s*\n"%-

JA> Simillarly, friends_email can be retrieved with:
JA>    %RegExpText="(?im-s)^\s*friends_email:\s*(.*?)\s*\n"%-

JA> And for your_name:
JA>    %RegExpText="(?im-s)^\s*your_name:\s*(.*?)\s*\n"%-

OK, I've been told to go to the TB! faqs to learn more and I
am sorry to say its useless for me :( I believe theirs
either an assumption that I already know RegEx and I should
only use all learning materials as a reference or someone
thinks it's really easy which makes me feel really stupid.

I would like to de-compile the above macros because I too
need them in a sense and I would surely be happy if any one
could help with some words of wisdom :)

%RegExpText="(?im-s)^\s*friends_name:\s*(.*?)\s*\n"%-
%RegExpText="(?im-s)^\s*friends_email:\s*(.*?)\s*\n"%-
%RegExpText="(?im-s)^\s*your_name:\s*(.*?)\s*\n"%-
^^^^^^^^^^^^^^^^^^^^^^^^         ^^^^^^^^^^^^^^^^^

I noticed from what I underlined that their is a lot of
recycled code in those lines. The mission of the macros is
to extract data from the *body*?

OK, Lets say then the whole purpose of the macros is to
extract data from the body. If I have a line of data that
looks like the below line:

friends name: Victor B. Gonzalez
       ^            ^  ^
friends name:       Victor B. Gonzalez
       ^     ^^^^^^^      ^  ^
       
Do the spaces I underlined screw things up? OK, Lets pretend
that they don't for simplicity sake.

What does what I underlined mean with the following?

%RegExpText="(?im-s)^\s*your_name:\s*(.*?)\s*\n"%-
             ^^^^^^^^^^^          ^^^^^^^^^^^^^ ^^

I understand this is what the macro %RegExpText="" that
starts it all looks like and something important goes in
between the quotes but how does such a figure of characters
come into play?

What does "%-" mean on the end of the macros? What
characters mean space, ID etc?

What if I got a form with three e-mail addresses on it but
it was formatted like the following:

email 1:         [EMAIL PROTECTED]
email 2:         [EMAIL PROTECTED]
email 3:         [EMAIL PROTECTED]

Can I get that single message to turn around and email three
people? In other words three emails are shot out
individually leaving the recipients with only their name in
the to: field.

I know its complex so lets start small. How does the below
line of code work? Would someone be so kind to break it
apart and reveal the truth?

%RegExpText="(?im-s)^\s*your_name:\s*(.*?)\s*\n"%-

I know I've been a little long but my interest in learning
macros is high and the materials out there are garbage. Not
that I wish to knock down what is out there but their is no
material that I can find that aims for the people who aren't
born with the extreme intelligence required to understand.

I'm smart and just need to know what are all the little
pieces that make it up? Can someone just break down the
macro for me but in a way like:

Ok a "." stands for space and a "?" stands for value your
after and a "\" means theirs more data to come...

Any way the macro can be explained I'll be happy. Can
someone please help?

JA> Note: If you are in the process of learning regular expressions and
JA>       how to use them in TB, I've used a shortcut with the %RegexpText
JA>       macro.  The expressions above are fairly simple, so such
JA>       shorcuts are justified.

I just want to learn what works... Please, I need help.

Thanks in advance :)

- -- 
Best regards,
 Victor B. Gonzalez                          
 [EMAIL PROTECTED]

Using The Bat! v1.62 Christmas Edition
Windows XP 5.1 Build 2600 Service Pack 1

-----BEGIN PGP SIGNATURE-----
Comment: Request My PGP Public Keys - [EMAIL PROTECTED]

iQA/AwUBPhMTa13LB35+TCg0EQLpTgCg69L18H2H4FN+n3mZ8HXLIKv3ExAAoOpR
kXZtagCpAeX+3Ll3yRFHd20C
=NAh+
-----END PGP SIGNATURE-----


________________________________________________________
 Current version is 1.61 | "Using TBTECH" information:
http://www.silverstones.com/thebat/TBUDLInfo.html

Reply via email to