Regex?

2000-09-25 Thread Charlie Turner

On 25/09/2000, at 22:30 

   I  haven't  been  able  to  find  any information in the help files
   regarding  how  I  position  the  cursor  (in a reply) *within* the
   quoted text. As an example, the message I want to reply to contains
   4  paragraphs  and  I want to position the cursor at the end of the
   first   paragraph.   Regex  I  guess  holds  the  answer  any  help
   appreciated, thanks.

Charlie Turner

TB ver:1.46d S/N:D912B2BF | On Windows 98 4.10 1998 Pll 350Mhz (128MB 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





RegEx

2001-03-09 Thread syv

Hi TBUDL,

I receive an email with this in the body:

Email: [EMAIL PROTECTED]

It is on Line 6 - Char 1

I need to send a automatic reply to [EMAIL PROTECTED]

Can somebody point me in the correct direction?

 


[EMAIL PROTECTED]
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

REAL PROBLEMS / REAL SOLUTION
ISSN: 1492-7829

A free weekly newsletter on Windows and networking
email: mailto:[EMAIL PROTECTED]

http://www.911networks.com

Copyright 1999-2001 by 911networks.com - All Rights Reserved

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

-- 
__
Archives   : 
Moderators : 
TBTech List: 
Unsubscribe: 

You are subscribed as : archive@jab.org





regex

2001-05-30 Thread Agustin E. Bolzan

I would like to change the headings of my replays from one language to
another  depending on the sender of the original message. I have asked
to  RITLABS  about the possibility of including in the address book an
item  for the "language" of the person, but meanwhile I plan to change
from  "estimado" to "dear" or "Sehr geehrte" in my messages by looking
in  some  typical  words  in  the original text. I think that for this
purpose,  I  should use the regular expressions ("regex") with the %IF
macro,  but  I  do  not get how to check something like: IF "you" then
"Dear"  else  "Ich" then "Sehr geehrte" else "tu" then "Estimado". Any
clue  about  this point?. I read the manual about the regex but it was
very confused for me.

Thanks a lot in advance

Best regards

Agustin

-- 
__
Archives   : <http://tbudl.thebat.dutaint.com>
Moderators : <mailto:[EMAIL PROTECTED]>
TBTech List: <mailto:[EMAIL PROTECTED]>
Unsubscribe: <mailto:[EMAIL PROTECTED]>

You are subscribed as : archive@jab.org





Re: Regex?

2000-09-27 Thread Peter Steiner

On Mon, 25 Sep 2000 22:37:00 +0100, Charlie Turner wrote:

CT> On 25/09/2000, at 22:30 

CT>I  haven't  been  able  to  find  any information in the help files
CT>regarding  how  I  position  the  cursor  (in a reply) *within* the
CT>quoted text. As an example, the message I want to reply to contains
CT>4  paragraphs  and  I want to position the cursor at the end of the
CT>    first   paragraph.   Regex  I  guess  holds  the  answer  any  help
CT>appreciated, thanks.

You could try working with two regexp matches:

%quotes="(regexp matching the first paragraph)"
%cursor
%quotes="(regexp matching from the second paragraph onwards)"

but i don't know if more than one %quotes macro within one template is
allowed.

HTH

Peter
-- 
Peter Steiner <[EMAIL PROTECTED]>

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





Re: Regex?

2000-09-27 Thread Marcel

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Charlie,

On Wednesday, September 27, 2000, Charlie Turner (ceejay) wrote:


[...]

CTc> Firstly  thanks  for your reply Peter. Being unfamiliar with the regex
CTc> format  used  in  TB, I really do need some in depth reading matter on
CTc> the  subject.  I've  stumbled  through some hit and miss attempts, but
CTc> sadly  I've  made  very  little  progress.  Any  suggestions regarding
CTc> reading matter, i.e. URL's or books Peter?

I don't know if you're looking for a small tutorial on RegExps in
general or for TB!, but since it had been years since I used VI (Unix)
I decided to download VIM. A nice editor that works with RegExps
as well.

One of the support sites also had a small tutorial about the regexps.
After reading that, it was very easy to apply Regexps in TB!.

The url for the tutorial is:
http://phylabs.sci.ccnv.cunv.edu/%7Eorvcc/vim-regex.html

If you can't find it there you could request it from my computer by
sending a message to: mailto:[EMAIL PROTECTED]?Subject=VIMRegEx

It won't be arriving immediately, because I don't have a persistant
connection, but I'm polling at least twice a day, so that should be a
problem. The file is in PDF-format and as a copy of the webpages.

- --
Cheers,
Marcel...

PGP Key ID: 0xADB5413E
PGP Key: mailto:[EMAIL PROTECTED]?Subject=SendPGPKey

... Kryten: We don't eat curries every night, if that's what you mean.
In fact,I distinctly remember a time last June:
Mr Lister had a pizza.

  ((C) Red Dwarf, "Holoship")

Using TB! v1.45 on Windows 95 4.0 Build 

-BEGIN PGP SIGNATURE-
Version: PGP 6.5i

iQA/AwUBOdJXAZtVOcettUE+EQK+ZQCg1IFRQ4qRIwE/UEi/CalMvKzxfk8An1xA
3ggpPbM8dPpqLiWu61wYmSwQ
=Xq/T
-END PGP SIGNATURE-

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





Re: Regex?

2000-09-27 Thread Marcel

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Charlie,

On Wednesday, September 27, 2000, Charlie Turner (ceejay) wrote:

M>> The url for the tutorial is:
M>> http://phylabs.sci.ccnv.cunv.edu/%7Eorvcc/vim-regex.html
CTc> Is that a valid URL Marcel? All I get is "cannot find server or DNS
CTc> error"
Euh, I guess not :(

I made a 'little' typo.
The URL should be:
http://physlab.sci.ccnv.cunv.edu/%7Eorvcc/vim-regex.html

- -- -
Cheers,
Marcel...

PGP Key ID: 0xADB5413E
PGP Key: mailto:[EMAIL PROTECTED]?Subject=SendPGPKey

... Confidence: I killed him, cha cha cha.
Lister: What do you mean you killed him cha cha cha?

  ((C) Red Dwarf, "Confidence and Paranoia")

Using TB! v1.45 on Windows 95 4.0 Build 

-BEGIN PGP SIGNATURE-
Version: PGP 6.5i

iQA/AwUBOdLBN5tVOcettUE+EQJdnQCfUn+2RUVzdhIrXkMr9y9CLEKw5rMAoN+R
lhvT1Izep4BJ/Vg0DMpeiN76
=MtZ0
-END PGP SIGNATURE-

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

You are subscribed as : archive@jab.org





Re: Regex?

2000-09-28 Thread Marcel

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi ztrader,

On Thursday, September 28, 2000, ztrader wrote:
z> I can't get that to work either. Even the
z> http://physlab.sci.ccnv.cunv.edu part does not work.

You're right, it doesn't.
I know what I did wrong.

I copied the url from one of the pages, and the bottom half is missing
:( (You've gotta love IE) therefore I thought there where v's in
the url.

The one must work:
http://physlab.sci.ccny.cuny.edu/%7Eorycc/vim-regex.html

Sorry for the mess I've created.

- -- -
Cheers,
Marcel...

PGP Key ID: 0xADB5413E
PGP Key: mailto:[EMAIL PROTECTED]?Subject=SendPGPKey

... Cat: Hang five, guys -- I'm getting something.
 He committed suicide, he committed suicide,
 he committed suicide, and the fish committed suicide.
 There's some kind of link here, but I can't quite put my
 finger on it.

   ((C) Red Dwarf, "Back to Reality")

Using TB! v1.45 on Windows 95 4.0 Build 

-BEGIN PGP SIGNATURE-
Version: PGP 6.5i

iQA/AwUBOdNyFJtVOcettUE+EQLYgQCfR0yKtOC7xAgSHF2OEkfJHNTHElgAoLc0
4cTchlrrjzIjnafgBtlJ5ywM
=sbJx
-END PGP SIGNATURE-

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

You are subscribed as : archive@jab.org





Re: Regex?

2000-09-28 Thread A . Curtis Martin

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, 28 Sep 2000 22:44:51 +0100, Charlie Turner (ceejay) wrote:

A>> After Peter was kind enough to come up with a regex that's going to
A>> simplify my life considerably, I decided to finally crack open a
A>> book previously recommended on this list. After 20 pages I feel my
A>> understanding of RE's has increased considerably. It's a very
A>> powerful concept. The book is "Mastering Regular Expressions" by
A>> Jeffrey Friedl (O'Reilly). It costs US $34.95 and is turning out to
A>> be worth twice the price.

CTc> My use of regexp has thus far been limited to that used in Gravity.
CTc> I believe format does vary depending on the platform being used.
CTc> Are the contents of the book relevant to TB's form of regexp, or is
CTc> it more of a Perl programers book?

It focus' a lot on Pearl but mentions other scripting languages and how
regex's differ between them. What it offers is a solid foundation and
understanding of regex's. TB!'s help will then fill in the concerns with
what metacharacters etc. are supported.

- --
A. Curtis Martin..
Moderator TBUDL/TBBETA  |  PGP Key ID: 0xEE079937
PGP Key: mailto:[EMAIL PROTECTED]?Subject=SendAlliePGPKey
- ---
** "Happiness is a warm puppy, said the anaconda. "

Using TB! v1.46d «» Win2k Pro SP1

-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8
Comment: Digitally signed for message and sender verification.

iQA/AwUBOdPMF/AXeSHuB5k3EQLtUQCgzFn0sfrSGjc+v2aDkXiKwia+nysAn10X
LqlaIZKsjOpFX86PpDejZadr
=3ZJ0
-END PGP SIGNATURE-

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





Re: Regex?

2000-09-28 Thread Peter Steiner

On Thu, 28 Sep 2000 11:04:38 -0400, Arnie wrote:

A> After Peter was kind enough to come up with a regex that's going to
A> simplify my life considerably, I decided to finally crack open a
A> book previously recommended on this list.  After 20 pages I feel my
A> understanding of RE's has increased considerably.  It's a very
A> powerful concept.  The book is "Mastering Regular Expressions" by
A> Jeffrey Friedl (O'Reilly).  It costs US $34.95 and is turning out to
A> be worth twice the price.

A> Of course Peter's solutions are free :).

But not as readily available as a book, sometimes I just don't do
'regexp'... ;-)

Peter
-- 
Peter Steiner <[EMAIL PROTECTED]>

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





Re: Regex?

2000-09-28 Thread Peter Steiner

On Thu, 28 Sep 2000 22:44:51 +0100, Charlie Turner (ceejay) wrote:

A>> The book is "Mastering Regular Expressions" by Jeffrey Friedl
A>> (O'Reilly). It costs US $34.95 and is turning out to be worth
A>> twice the price.

CTc> My use of regexp has thus far been limited to that used in Gravity. I
CTc> believe format does vary depending on the platform being used. Are the
CTc> contents of the book relevant to TB's form of regexp, or is it more of
CTc> a Perl programers book?

While i don't know this book, i can assure you that TB! regexps are
very close to Perl regexps. The regexp implementation is not from Stef
or Max themselves, but is the third party library PCRE. And PCRE means
Perl Compatible RegExps... The few differences to Perl are documented
in the help file. Unfortunately, with PCRE only matching is possible,
while Perl has the very powerful subsitute operator working with
regexps.

Regards
-- 
Peter Steiner <[EMAIL PROTECTED]>

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

You are subscribed as : archive@jab.org





Regex Problem

2000-10-31 Thread Dirk Heiser

Hi there,

To Clean up Subjects like this:
   Antwort: [Palm] Re: [Palm] fwd: [palm] re: new Subject (was: old s)
   (yes i really received Subjects like this :-) )
To this:
   Re: new Subject

I used one of the Regex i found here and tryed to modify it.

I use a Quick Template Named "INC_MYSUBJEKT" that contain this:


%SUBJECT="%SETPATTREGEXP=""(?i)\A(?:(?:\s*(?:fwd|re|aw|fw|antwort|wg|forw)(?:\[\d*\])?:\s*)|(?:\s*\[(?:Palm|palmcomp)\]\s*))*(.*?)(?:(?:\s*\((?:was|war):.*\)\s*)|(?:\(PGP
 Decrypted\)))*\z""%REGEXPMATCH=""%OSUBJ"""


In my Replay Templates i use:

  %QINCLUDE="INC_MYSUBJEKT"%SUBJECT="Re: %SUBJ"
  or
  %QINCLUDE="INC_MYSUBJEKT"%SUBJECT="Re: [Palm] %SUBJ"
  in the Mailing List (inserting this [Palm] Prefix) Templates


This all work fine for all cases i tryed, but if i use a Subjekt like

   Fwd: Test

I get

  Re: : Test
 ^^

I only have this Problem if the Subjekt contain a "Fwd", all other
Prefixes work fine.

If i try this Regex with another Program (XNews) that use also Regular
Expresions this Regex work fine with cutting of the "Fwd" String.


Is the a Bug in TB! or is there a Problem with my Regex (different
default settings)?

cu,
 Dirk

-- 
The Bat! (1.48 Beta/1) Educational [12A1F196]
OS: Windows 95 4.0 Build   B
-- 
--
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





Filters (RegEx?)

2005-02-12 Thread Richard H. Stoddard
I'm trying to filter out the remaining junk mail that gets by BayesIt
(and K9), the most prevalent of which are messages that have my e-mail
address but a name other than mine. (I've already filtered out mail that
doesn't have my e-mail address in the recipient field.) I tried to
read the instructions for RegEx, but just came away totally confused.
Is there a simple way to do this?

-- 
Thanks,
Rick



Current version is 3.0.1.33 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re: Regex

2002-05-14 Thread Gerd Ewald

Hello Adam !

  
On Tue, 14 May 2002 15:15:31 -0400 (EDT) GMT your local time,
which was 14.05.2002, 21:15 (GMT+0200) where I live, you wrote:


> If you wanted to match 'count' but not 'counting', how would you do that?


You mean 'count' as a word of its own? Ok, this will be explained next
part. Anyway, I can tell you that there are metacharacters indicating
a word boundary ("\b"). So, although this is to early: "\bcount\b" is
_one_ possibility.

-- 
Best regards,
 Gerd 
===
Tutorial "PGP and TB!" and "How to Use Regular Expressions
in TB!" at www.pro-privacy.de
---
Necessity is the plea for every infringement of human freedom.
It is the argument of tyrants; it is the creed of slaves.
 (William Pitt, British Prime Minister, November 18, 1783)
---
now playing: Mussorgsky - Eine Nacht auf dem Kahlen Berge



Current Ver: 1.60k
FAQ: http://faq.thebat.dutaint.com 
Unsubscribe: mailto:[EMAIL PROTECTED]
Archives   : http://tbudl.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
TBTech List: mailto:[EMAIL PROTECTED]
Bug Reports: https://bt.ritlabs.com



Re: Regex

2002-05-14 Thread Jan Rifkinson

Hello David.

At 5:53 PM on Tuesday, May 14, 2002 you wrote the following
about [Regex]:

David> LS0tLS1CRUdJTiBQR1AgU0lHTkVEIE1FU1NBR0UtLS0tLQ0KSGFzaDogU0hBMQ0KDQpIZWxsbyBE

  Will you plse send your encrypted msgs privately?

-- 
Jan Rifkinson
Ridgefield, CT USA
TB! V1.60c/W2K_SP2
ICQ 41116329



Current Ver: 1.60k
FAQ: http://faq.thebat.dutaint.com 
Unsubscribe: mailto:[EMAIL PROTECTED]
Archives   : http://tbudl.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
TBTech List: mailto:[EMAIL PROTECTED]
Bug Reports: https://bt.ritlabs.com



Re: Regex

2002-05-14 Thread Marck D Pearlstone

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Gerd,

@14 May 2002, 23:04:01 +0200 (22:04 UK time) Gerd Ewald wrote in
[EMAIL PROTECTED]">mid:[EMAIL PROTECTED]

>> LS0tLS1CRUdJTiBQR1AgU0lHTkVEIE1FU1NBR0UtLS0tLQ0KSGFzaDogU0hBMQ0KDQpTYWx1dGF0

> What do you mean?

>> On 14 May 2002 at 15:15:31 -0400 (EDT) (which was 20:15 where I
>> live) Adam graced us with these comments

>>> If you wanted to match 'count' but not 'counting', how would you do that?
>>
>> Part 2 ;)
>>
>> ¿ Is the place for RegEx questions TBTEC ?

Probably - but watch that "Treat 8 bit characters as | Base 64"
setting - the "content type" header doesn't survive the listar server
and the base 64 text is reproduced raw!

- --
Cheers -- .\\arck D. Pearlstone -- List moderator
TB! v1.60k-14F4B4B2 on Windows 2000 5.0.2195 Service Pack 2
·
-BEGIN PGP SIGNATURE-

iD8DBQE84ZooOeQkq5KdzaARAvvaAKDwVIQdPXXyBa/K2cF3PNcEHYtfQgCghWw+
Y0qMVz0Xcn0yuTe6yygvi0o=
=OzKZ
-END PGP SIGNATURE-




Current Ver: 1.60k
FAQ: http://faq.thebat.dutaint.com 
Unsubscribe: mailto:[EMAIL PROTECTED]
Archives   : http://tbudl.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
TBTech List: mailto:[EMAIL PROTECTED]
Bug Reports: https://bt.ritlabs.com



Re: Regex

2002-05-14 Thread Marck D Pearlstone

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Jan,

@14 May 2002, 17:55:14 -0400 (22:55 UK time) Jan Rifkinson wrote in
[EMAIL PROTECTED]">mid:[EMAIL PROTECTED]

David>> LS0tLS1CRUdJTiBQR1AgU0lHTkVEIE1FU1NBR0UtLS0tLQ0KSGFzaDogU0hBMQ0KDQpIZWxsbyBE

>   Will you plse send your encrypted msgs privately?

Not encrypted - _encoded_. David said:

>> WHAT HAPPENED !!
>>
>> What left me was

But I've already given the answer about 8 bit character encoding.

- --
Cheers -- .\\arck D. Pearlstone -- List moderator
TB! v1.60k-14F4B4B2 on Windows 2000 5.0.2195 Service Pack 2
·
-BEGIN PGP SIGNATURE-

iD8DBQE84Zp8OeQkq5KdzaARAs5DAKDAnjcfxm27zUocvJPYJlLKNbmU5gCgglNt
MUlsz6Cj+TG1rJY1OnCUCK4=
=nDGQ
-END PGP SIGNATURE-




Current Ver: 1.60k
FAQ: http://faq.thebat.dutaint.com 
Unsubscribe: mailto:[EMAIL PROTECTED]
Archives   : http://tbudl.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
TBTech List: mailto:[EMAIL PROTECTED]
Bug Reports: https://bt.ritlabs.com



Re: Regex

2002-05-14 Thread Gerd Ewald

Hello David Elliott !

  
On Tue, 14 May 2002 19:39:16 +0100 GMT your local time,
which was 14.05.2002, 20:39 (GMT+0200) where I live, you wrote:


> LS0tLS1CRUdJTiBQR1AgU0lHTkVEIE1FU1NBR0UtLS0tLQ0KSGFzaDogU0hBMQ0KDQpTYWx1dGF0

What do you mean?


-- 
Best regards,
 Gerd 
===
Tutorial "PGP and TB!" and "How to Use Regular Expressions
in TB!" at www.pro-privacy.de
---
O mortal man that lives by bread,
 What makes thy nose so red,
 That silly fool that look so pale,
 Tis drinking Sally Birkett's ale.
 (Aufschrift auf einer Tafel eines engl. Pubs)
---
now playing: WDR2 :-)



Current Ver: 1.60k
FAQ: http://faq.thebat.dutaint.com 
Unsubscribe: mailto:[EMAIL PROTECTED]
Archives   : http://tbudl.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
TBTech List: mailto:[EMAIL PROTECTED]
Bug Reports: https://bt.ritlabs.com



Re: Regex

2002-05-14 Thread Dwight A Corrin

On Tuesday, May 14, 2002, 5:23:30 PM, David Elliott wrote:


>>   Will you plse send your encrypted msgs privately?

> See previous mail.

> I would not expect a response like this from you. As I am sure you know any
> encrypted email will start with something like

If you aren't sending encripted mail, then please stop sending all
that garbage text.

-- 
Dwight A. Corrin
P O Box 47828
Wichita KS 67201-7828
316.263.9706  fax 316.263.6385
mailto:[EMAIL PROTECTED]
Using The Bat! 1.60 on Windows XP version 5,1




Current Ver: 1.60k
FAQ: http://faq.thebat.dutaint.com 
Unsubscribe: mailto:[EMAIL PROTECTED]
Archives   : http://tbudl.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
TBTech List: mailto:[EMAIL PROTECTED]
Bug Reports: https://bt.ritlabs.com



Re: Regex

2002-05-15 Thread Adam



On Tue, 14 May 2002, Gerd Ewald wrote:

> Hello Adam !
>
>
> On Tue, 14 May 2002 15:15:31 -0400 (EDT) GMT your local time,
> which was 14.05.2002, 21:15 (GMT+0200) where I live, you wrote:
>
>
> > If you wanted to match 'count' but not 'counting', how would you do that?
>
>
> You mean 'count' as a word of its own? Ok, this will be explained next
> part. Anyway, I can tell you that there are metacharacters indicating
> a word boundary ("\b"). So, although this is to early: "\bcount\b" is
> _one_ possibility.

If I do this, some of the messages found under Message Finder do not
contain my word at all.  Odd, don't you think?




Current Ver: 1.60k
FAQ: http://faq.thebat.dutaint.com 
Unsubscribe: mailto:[EMAIL PROTECTED]
Archives   : http://tbudl.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
TBTech List: mailto:[EMAIL PROTECTED]
Bug Reports: https://bt.ritlabs.com



Re: Regex

2002-05-15 Thread Gerd Ewald

Hello Adam !

  
On Tue, 14 May 2002 16:32:37 -0400 (EDT) GMT your local time,
which was 14.05.2002, 22:32 (GMT+0200) where I live, you wrote:

[...]

> If I do this, some of the messages found under Message Finder do not
> contain my word at all.  Odd, don't you think?

Hmmm, I tried, as you told me, to look for "count" with F7 and Regex
ON. And yes I found some, that do not have the word at all: not in
text and not in the kludges. Even a test message like 'bladibla' that
I sent to myself matched. Total match in that folder: 187

Next step was to search for "\bcount\b" and Regex on. That was ok.
Total match in that folder: 45

Well, Adam and I thought that this is a bit strange...

But I think the regex question was answered?!

-- 
Best regards,
 Gerd 
===
Tutorial "PGP and TB!" and "How to Use Regular Expressions
in TB!" at www.pro-privacy.de
---
You know you've landed gear-up when it takes full power to taxi.
---
now playing: WDR2 :-)



Current Ver: 1.60k
FAQ: http://faq.thebat.dutaint.com 
Unsubscribe: mailto:[EMAIL PROTECTED]
Archives   : http://tbudl.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
TBTech List: mailto:[EMAIL PROTECTED]
Bug Reports: https://bt.ritlabs.com



Re: Regex

2002-05-15 Thread Jan Rifkinson

Hello David.

At 6:23 PM on Tuesday, May 14, 2002 you wrote the following
about [Regex]:

David> I would not expect a response like this from you. As
David> I am sure you know [...]

  Was annoyed @ the world & misdirected my animus; sorry.

-- 
Jan Rifkinson
Ridgefield, CT USA
TB! V1.60c/W2K_SP2
ICQ 41116329



Current Ver: 1.60k
FAQ: http://faq.thebat.dutaint.com 
Unsubscribe: mailto:[EMAIL PROTECTED]
Archives   : http://tbudl.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
TBTech List: mailto:[EMAIL PROTECTED]
Bug Reports: https://bt.ritlabs.com



RegEx question

2002-08-18 Thread Sergey Uvarov

Dear tbudl,

 I want to extract one HTML string naving particular color.
 How can i do this?

 Problem is, that this RegEx stops on *last* "" sequence, not on
 first. And this RegEx gives all text within first "80" and last
 "".

,- [  ]
| %SETPATTREGEXP='(80)(.*s?)()'%REGEXPBLINDMATCH='%COMMENT'%SUBPATT='2'
`-

But I need text *between*  "80" and  first "" after "80"!

-- 

Best regards,
Sergey Uvarov

mailto:[EMAIL PROTECTED]

TheBat version :1.62/Beta1,
Running at NT 5.0, Build 2195 Service Pack 2.



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



Regex Help

2001-01-11 Thread Nick Danger

Let me try another plea for help

Is it possible to take today's date that is formatted 1/11/2001 by
%DATESHORT and have it reformatted to a 20010111 style? (MMDD)

TIA

-- 
ò¸ó Nick [MUA: TB! 1.49]
 Danger  [OS: Win98 4.10 1998]



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

You are subscribed as : archive@jab.org





Re: RegEx

2001-03-09 Thread Gerd Ewald

Hello syv !

 
On Wed, 7 Mar 2001 14:06:52 -0800 GMT your local time,
which was 07.03.2001, 23:06 (GMT+0100) where I live, you wrote:

> I receive an email with this in the body:
> Email: [EMAIL PROTECTED]
> It is on Line 6 - Char 1
> I need to send a automatic reply to [EMAIL PROTECTED]
> Can somebody point me in the correct direction?

With the Regexp it always has to be in line 6. Whenever this changes,
you have to change the number in {} appropriatly.


%TO=""%To="%SETPATTREGEXP=""(?is)(^.*?){5}([EMAIL PROTECTED])""%REGEXPBLINDMATCH=""%text""%SUBPATT=""2"""


I tested it with some test text without errors. But as I'm a beginner
in Regexp I will not guarantee for nothing :-)

-- 
Best regards,
 Gerd 
==
Using The Bat! Version 1.51
PGP-Keys on request mailto:[EMAIL PROTECTED]?subject=send_key

IBM: Its Better Manually



-- 
__
Archives   : 
Moderators : 
TBTech List: 
Unsubscribe: 

You are subscribed as : archive@jab.org





Re: RegEx

2001-03-09 Thread Gerd Ewald

Hello Gerd Ewald !

 
On Sat, 10 Mar 2001 00:05:00 +0100 GMT your local time,
which was 10.03.2001, 00:05 (GMT+0100) where I live, you wrote:

> With the Regexp it always has to be in line 6. Whenever this changes,
[...]
> %TO=""%To="%SETPATTREGEXP=""(?is)(^.*?){5}
[...]


Sorry, it wasn't my day yesterday. I posted the correct answer to
TBTech! Sorry for the noise!


-- 
Best regards,
 Gerd 
==
Using The Bat! Version 1.51
PGP-Keys on request mailto:[EMAIL PROTECTED]?subject=send_key

If I worked as much as others, I would do as little as they.



-- 
__
Archives   : 
Moderators : 
TBTech List: 
Unsubscribe: 

You are subscribed as : archive@jab.org





Regex question

2001-03-19 Thread ztrader

I'd like to filter on a subject line. The structure is:

Startword stuff in the middle Endword

This structure is sometimes prefixed with another word or two as:

[pre1.. pren] Startword stuff in the middle Endword

The 1-3 words in the beginning are always surrounded by square
brackets [ ].

What I'd like to do is ignore the brackets, and any words in the
brackets, and still be able to filter on Startword and Endword. How
can I do that?

T much IA,

ztrader

-- 
__
Archives   : 
Moderators : 
TBTech List: 
Unsubscribe: 




Re: regex

2001-05-30 Thread Jan Rifkinson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello Agustin,

On Wednesday, May 30, 2001 09:06:28 [ -0300 GMT], you wrote the
following in regards to 'regex':

Agustin> I would like to change the headings of my replays from one language to
Agustin> another  depending on the sender of the original message. I have asked
Agustin> to  RITLABS  about the possibility of including in the address book an
Agustin> item  for the "language" of the person

  For the moment, you might try inserting a language abbreviation like
  "ae", "fi", "fr", etc (look @ Help -> template macros) into a little
  used area that already exists like the 'suffix' or 'memo'? Then you
  might use that value in your regexp as part of the ABnnnPPP macro.

  I wish I could suggest a regexp for you to try but someone else will
  have to do that. Usually you get a better reaction for a regexp
  question on the TBTech list.

- --
Jan Rifkinson
Ridgefield, CT USA
TB! V1.52f/W2K_SP2/PGP Key ID: 0x3F14A060
ICQ 41116329

-BEGIN PGP SIGNATURE-
Version: PGP 6.5i

iQA/AwUBOxVCYw5GgMN5yqF7EQLCNgCgmzQmO+leu4Nqxmvjg/XEpndEG8wAoMUi
GmZvnVWCHvJ5y8oezixeGPUE
=P1u0
-END PGP SIGNATURE-


-- 
__
Archives   : <http://tbudl.thebat.dutaint.com>
Moderators : <mailto:[EMAIL PROTECTED]>
TBTech List: <mailto:[EMAIL PROTECTED]>
Unsubscribe: <mailto:[EMAIL PROTECTED]>

You are subscribed as : archive@jab.org





Re: regex

2001-05-30 Thread Thomas

Hi Jan,

On Wed, 30 May 2001 14:55:54 -0400GMT (31/05/2001, 02:55 +0800GMT),
Jan Rifkinson wrote:

Agustin>> I would like to change the headings of my replays from one language to
Agustin>> another  depending on the sender of the original message. I have asked
Agustin>> to  RITLABS  about the possibility of including in the address book an
Agustin>> item  for the "language" of the person

JR>   For the moment, you might try inserting a language abbreviation like
JR>   "ae", "fi", "fr", etc (look @ Help -> template macros) into a little
JR>   used area that already exists like the 'suffix' or 'memo'? Then you
JR>   might use that value in your regexp as part of the ABnnnPPP macro.

That is not necessary. You don't need a macro at all.

Put the word with which you want to address the person ("Sehr geehrter
Herr ", "Estimado Amigo ", "Mon cher "...) into the Memo field of the
address book entry. And in your template, just call:

%ABMemo %ABFirstName

and all will be fine.

-- 

Cheers,
Thomas.

Moderator der deutschen The Bat! Beginner Liste. Anmeldung unter:
[EMAIL PROTECTED]  

Message reply created with The Bat! 1.52f
under Chinese Windows 98 4.10 Build 1998  
on a Pentium II/350 MHz.

-- 
__
Archives   : 
Moderators : 
TBTech List: 
Unsubscribe: 

You are subscribed as : archive@jab.org





Re: regex

2001-05-30 Thread Januk Aggarwal

Hi Thomas,

Historians believe that Thu, 31 May 2001 at 11:34 GMT +0800 was when,
Thomas [TF] typed the following:

TF> That is not necessary. You don't need a macro at all.

True.  Better yet, make a few quick templates (one for each
language/gender) then put the appropriate QT Handle in the AB memo
field and use:
%QINCLUDE="%ABtoMEMO"

This makes maintenance easiest.

TF> Put the word with which you want to address the person ("Sehr geehrter
TF> Herr ", "Estimado Amigo ", "Mon cher "...) into the Memo field of the
TF> address book entry. And in your template, just call:

TF> %ABMemo %ABFirstName

That works too.  Just note that the %AB macro syntax is a bit
different than what you've written.  In this case, you'd probably
want:
%ABtoMEMO %ABtoFIRSTNAME
   ^^^^

-- 
Thanks for writing,
 Januk Aggarwal

Using The Bat! 1.53 Beta/11 under Windows 98 4.10 Build   A

Ok, who is General Relativity, and what did he do with Sir Newton?

-- 
__
Archives   : 
Moderators : 
TBTech List: 
Unsubscribe: 

You are subscribed as : archive@jab.org





Re: regex

2001-05-31 Thread Dierk Haasis

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello Januk!

On Thursday, May 31, 2001 at 6:41:29 AM you wrote:

> That works too.  Just note that the %AB macro syntax is a bit
> different than what you've written.  In this case, you'd probably
> want:
> %ABtoMEMO %ABtoFIRSTNAME
>^^^^

Wouldn't it be easier to put the appropriate greeting directly into the
AB templates?



- --
Dierk Haasis
http://www.Write4U.de

PGP keys available: mailto:[EMAIL PROTECTED]?Subject=SendMyPGPkeys

The Bat 1.53 Beta/11

Windows 95 4.0 1212 C

Be good and you will be lonesome. (Mark Twain)

-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8ckt
Comment: Privacy is the core element to Freedom!

iQA/AwUBOxXf/fTo1oA8g8dLEQIGXACg7LchlUzzfcY1AIEebdLwgjBzGLAAnAlO
aAbcHk4YdxoY2kxADTiEIuNx
=++wA
-END PGP SIGNATURE-

-- 
__
Archives   : 
Moderators : 
TBTech List: 
Unsubscribe: 

You are subscribed as : archive@jab.org





Re: regex

2001-05-31 Thread Thomas

Hi Januk,

On Wed, 30 May 2001 21:41:29 -0700GMT (31/05/2001, 12:41 +0800GMT),
Januk Aggarwal wrote:

JA> True.  Better yet, make a few quick templates (one for each
JA> language/gender) then put the appropriate QT Handle in the AB memo
JA> field and use:
JA> %QINCLUDE="%ABtoMEMO"

Smart. ;-)

JA> That works too.  Just note that the %AB macro syntax is a bit
JA> different than what you've written.  In this case, you'd probably
JA> want:
JA> %ABtoMEMO %ABtoFIRSTNAME
JA>^^^^

Oops. You're right, of course.

-- 

Cheers,
Thomas.

Moderator der deutschen The Bat! Beginner Liste. Anmeldung unter:
[EMAIL PROTECTED]  

Message reply created with The Bat! 1.52f
under Chinese Windows 98 4.10 Build 1998  
on a Pentium II/350 MHz.

-- 
__
Archives   : 
Moderators : 
TBTech List: 
Unsubscribe: 

You are subscribed as : archive@jab.org





Re: regex

2001-05-31 Thread Thomas

Hi Oleg,

On Thu, 31 May 2001 13:21:31 +0500GMT (31/05/2001, 16:21 +0800GMT),
OK3 wrote:

O> Why not use %ABtoNamePrefix %ABtoFIRSTNAME?

Because I didn't even know this field existed. ;-) Of course it makes
more sense. The Memo field is just the "general placeholder" for
me.

-- 

Cheers,
Thomas.

Moderator der deutschen The Bat! Beginner Liste. Anmeldung unter:
[EMAIL PROTECTED]  

Message reply created with The Bat! 1.52f
under Chinese Windows 98 4.10 Build 1998  
on a Pentium II/350 MHz.


-- 
__
Archives   : 
Moderators : 
TBTech List: 
Unsubscribe: 

You are subscribed as : archive@jab.org





Re: regex

2001-05-31 Thread Januk Aggarwal

Hello Dierk,

Historians believe that Thu, 31 May 2001 at 09:09 GMT +0200 was when,
Dierk Haasis [DH] typed the following:

DH> Wouldn't it be easier to put the appropriate greeting directly into the
DH> AB templates?

That works as well, but Quick Templates are still recommended to keep
maintenance simpler.
 

-- 
Thanks for writing,
 Januk Aggarwal

Using The Bat! 1.53 Beta/11 under Windows 98 4.10 Build   A

I was the next door kid's imaginary friend.

-- 
__
Archives   : 
Moderators : 
TBTech List: 
Unsubscribe: 

You are subscribed as : archive@jab.org





SOT: Regex Help

2000-04-17 Thread Nick Danger


Just an FYI for anyone interested.

There's a little regex primer at the developer shed that's pretty
helpful if you're a regex neophyte such as myself.

http://www.devshed.com/Server_Side/Administration/RegExp/

-- 
- Nick

Using The Bat! 1.42 Beta/17
 under Windows 98 4.10 Build
1998  



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





Regex Macro Help

2004-01-14 Thread Patrick G.
Hello fellow Bat!fans,

I have the following regex which works fine in RegExTest

  ^\".{2,}\"\s\-{2}.{20}

But when I add it to a macro filter to extract this match to a file

%REGEXPTEXT="^\".{2,}\"\s\-{2}.{20}"

I get the followng error:

 *** Error: \ at end of pattern ***.{2,}\"\s\-{2}.{20})"

 Perhaps I've been at this too long this evening, but even after
 searching teh archives and reading the RegEx tutorial, I can not
 figure out what I'm doing wrong.

 Any suggestiosn, pointers?


TIA,
Patrick G.
-- 

  The Bat! Version 2.03 Beta/33
  assisted by BayesIt! 0.4gm
  hindered by Windows XP 5.1 Build 2600 Service Pack 1



Current version is 2.02.3 CE | "Using TBUDL" information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re[2]: Regex?

2000-09-27 Thread Charlie Turner (ceejay)

Hello Peter

On 27 September 2000, at 21:07, you wrote

CT>>I  haven't  been  able  to  find  any information in the help files
CT>>regarding  how  I  position  the  cursor  (in a reply) *within* the
CT>>quoted text. As an example, the message I want to reply to contains
CT>>4  paragraphs  and  I want to position the cursor at the end of the
CT>>first   paragraph.   Regex  I  guess  holds  the  answer  any  help
CT>>appreciated, thanks.

PS> You could try working with two regexp matches:

PS> %quotes="(regexp matching the first paragraph)"
PS> %cursor
PS> %quotes="(regexp matching from the second paragraph onwards)"

PS> but i don't know if more than one %quotes macro within one template is
PS> allowed.

Firstly  thanks  for your reply Peter. Being unfamiliar with the regex
format  used  in  TB, I really do need some in depth reading matter on
the  subject.  I've  stumbled  through some hit and miss attempts, but
sadly  I've  made  very  little  progress.  Any  suggestions regarding
reading matter, i.e. URL's or books Peter?

-- 
have a good day
   Charlie (ceejay)

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





Re[2]: Regex?

2000-09-27 Thread Charlie Turner (ceejay)

Hello Marcel

On 27 September 2000, at 22:22, you wrote

M> One of the support sites also had a small tutorial about the regexps.
M> After reading that, it was very easy to apply Regexps in TB!.

M> The url for the tutorial is:
M> http://phylabs.sci.ccnv.cunv.edu/%7Eorvcc/vim-regex.html

Is that a valid URL Marcel? All I get is "cannot find server or DNS
error"

-- 
have a good day
   Charlie (ceejay)

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

You are subscribed as : archive@jab.org





Re[2]: Regex?

2000-09-27 Thread ztrader

On Wednesday, September 27, 2000, 9:55:17 PM, you wrote:

M> I made a 'little' typo. The URL should be:
M> http://physlab.sci.ccnv.cunv.edu/%7Eorvcc/vim-regex.html

I can't get that to work either. Even the
http://physlab.sci.ccnv.cunv.edu part does not work.

ztrader

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

You are subscribed as : archive@jab.org





Re[3]: Regex?

2000-09-28 Thread Arnie

Hi Charlie,

Wednesday, September 27, 2000, 4:51:46 PM, you wrote:



CTc> Firstly  thanks  for your reply Peter. Being unfamiliar with the regex
CTc> format  used  in  TB, I really do need some in depth reading matter on
CTc> the  subject.  I've  stumbled  through some hit and miss attempts, but
CTc> sadly  I've  made  very  little  progress.  Any  suggestions regarding
CTc> reading matter, i.e. URL's or books Peter?

After Peter was kind enough to come up with a regex that's going to
simplify my life considerably, I decided to finally crack open a
book previously recommended on this list.  After 20 pages I feel my
understanding of RE's has increased considerably.  It's a very
powerful concept.  The book is "Mastering Regular Expressions" by
Jeffrey Friedl (O'Reilly).  It costs US $34.95 and is turning out to
be worth twice the price.

Of course Peter's solutions are free :).



-- 
Best regards,
 Arnie



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





Re[4]: Regex?

2000-09-28 Thread Charlie Turner (ceejay)

Hello Arnie

On 28 September 2000, at 16:04, you wrote

CTc>> Firstly  thanks  for your reply Peter. Being unfamiliar with the regex
CTc>> format  used  in  TB, I really do need some in depth reading matter on
CTc>> the  subject.  I've  stumbled  through some hit and miss attempts, but
CTc>> sadly  I've  made  very  little  progress.  Any  suggestions regarding
CTc>> reading matter, i.e. URL's or books Peter?

A> After Peter was kind enough to come up with a regex that's going to
A> simplify my life considerably, I decided to finally crack open a
A> book previously recommended on this list.  After 20 pages I feel my
A> understanding of RE's has increased considerably.  It's a very
A> powerful concept.  The book is "Mastering Regular Expressions" by
A> Jeffrey Friedl (O'Reilly).  It costs US $34.95 and is turning out to
A> be worth twice the price.

My use of regexp has thus far been limited to that used in Gravity. I
believe format does vary depending on the platform being used. Are the
contents of the book relevant to TB's form of regexp, or is it more of
a Perl programers book?

-- 
have a good day
   Charlie (ceejay)

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





Re[2]: Regex?

2000-09-28 Thread Charlie Turner (ceejay)

Hello Marcel

On 28 September 2000, at 18:29, you wrote

M> I copied the url from one of the pages, and the bottom half is missing
M> :( (You've gotta love IE) therefore I thought there where v's in
M> the url.

M> The one must work:
M> http://physlab.sci.ccny.cuny.edu/%7Eorycc/vim-regex.html

Yep that worked fine Marcel thanks, a very useful site. It was
promptly added my favorites folder.

-- 
have a good day
   Charlie (ceejay)

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

You are subscribed as : archive@jab.org





Re[2]: Regex?

2000-09-28 Thread Charlie Turner (ceejay)

Hello A

On 28 September 2000, at 23:54, you wrote

CTc>> My use of regexp has thus far been limited to that used in Gravity.
CTc>> I believe format does vary depending on the platform being used.
CTc>> Are the contents of the book relevant to TB's form of regexp, or is
CTc>> it more of a Perl programers book?

ACM> It focus' a lot on Pearl but mentions other scripting languages and how
ACM> regex's differ between them. What it offers is a solid foundation and
ACM> understanding of regex's. TB!'s help will then fill in the concerns with
ACM> what metacharacters etc. are supported.

Well I think on your recommendation I'll go check it out, thanks
again.

-- 
have a good day
   Charlie (ceejay)

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

You are subscribed as : archive@jab.org





Re[2]: Regex?

2000-09-28 Thread Charlie Turner (ceejay)

Hello Peter

On 28 September 2000, at 23:08, you wrote

CTc>> My use of regexp has thus far been limited to that used in Gravity. I
CTc>> believe format does vary depending on the platform being used. Are the
CTc>> contents of the book relevant to TB's form of regexp, or is it more of
CTc>> a Perl programers book?

PS> While i don't know this book, i can assure you that TB! regexps are
PS> very close to Perl regexps. The regexp implementation is not from Stef
PS> or Max themselves, but is the third party library PCRE. And PCRE means
PS> Perl Compatible RegExps... The few differences to Perl are documented
PS> in the help file. Unfortunately, with PCRE only matching is possible,
PS> while Perl has the very powerful subsitute operator working with
PS> regexps.

Sounds good enough for me Peter, I'll be off to browse the bookshelves
this weekend.

-- 
have a good day
   Charlie (ceejay)

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

You are subscribed as : archive@jab.org





Re: Regex Problem

2000-11-01 Thread Christian Gassmann

Dirk Heiser <[EMAIL PROTECTED]> wrote:

[...]

> 
> 
>%SUBJECT="%SETPATTREGEXP=""(?i)\A(?:(?:\s*(?:fwd|re|aw|fw|antwort|wg|forw)(?:\[\d*\])?:\s*)|(?:\s*\[(?:Palm|palmcomp)\]\s*))*(.*?)(?:(?:\s*\((?:was|war):.*\)\s*)|(?:\(PGP
> Decrypted\)))*\z""%REGEXPMATCH=""%OSUBJ"""
> 

Put ":?\s*" (without the quotation marks) right after "(?i)\A".

[...]
> Is the a Bug in TB! or is there a Problem with my Regex (different
> default settings)?

I think the change will help, but I don't know if it's a TB or a
Regexp related problem...

-- 
Christian Gassmann

The Bat! 1.48 Beta/1 under Windows NT 4.0 Service Pack 6, RC 1.5

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





Re: Regex Problem

2000-11-01 Thread Peter Steiner

Hello Dirk

On Wed, 1 Nov 2000 00:31:49 +0100, Dirk Heiser wrote:

DH> To Clean up Subjects like this:
DH>Antwort: [Palm] Re: [Palm] fwd: [palm] re: new Subject (was: old s)
DH>(yes i really received Subjects like this :-) )
DH> To this:
DH>Re: new Subject

DH> I used one of the Regex i found here and tryed to modify it.

[snip]

DH> This all work fine for all cases i tryed, but if i use a Subjekt like

DH>Fwd: Test

DH> I get

DH>   Re: : Test
DH>  ^^

DH> I only have this Problem if the Subjekt contain a "Fwd", all other
DH> Prefixes work fine.

DH> Is the a Bug in TB! or is there a Problem with my Regex (different
DH> default settings)?

I noticed this strange extra colon with Fwd: too, but i didn't
investigate until now...

It's a problem with TB. When the original subject contains "Fwd:",
the colon is not stripped but when the subject contains "Re:", then
the colon is stripped...

All you have to do is insert "(\:\s*)?" just after the RegExp options
and increment the %SubPatt. Below you find an example that seems to
work (but it doesn't do all the fancy things your RE does - it does
not strip the "(was:...)" part of the subject).


%subject="Re: 
%SETPATTREGEXP='(?i)(\:\s*)?(((Re|Aw|Antwort):|\[(Palm|palmcomp)\])\s*)*(.*)'%REGEXPBLINDMATCH='%OSUBJ'%SUBPATT='6'"


BTW: could anybody using S/MIME please tell the exact string inserted
by TB when decrypting? Now the RE just removes the "(PGP Decrypted)"
suffix...

Regards

Peter
-- 
Peter Steiner <[EMAIL PROTECTED]>

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





Re: Regex Problem

2000-11-01 Thread Peter Steiner

On Wed, 1 Nov 2000 10:39:30 +0100, I wrote:

PS> 
PS> %subject="Re: 
%SETPATTREGEXP='(?i)(\:\s*)?(((Re|Aw|Antwort):|\[(Palm|palmcomp)\])\s*)*(.*)'%REGEXPBLINDMATCH='%OSUBJ'%SUBPATT='6'"
PS> 

PS> BTW: could anybody using S/MIME please tell the exact string inserted
PS> by TB when decrypting? Now the RE just removes the "(PGP Decrypted)"
PS> suffix...

Oops, i got the wrong RE, it doesn't remove the Decrypted part. Try
this one:


%subject="Re: %SETPATTREGEXP='(?i)(\:\s*)?(((Re|Aw|Antwort):|\[(Palm
|palmcomp)\])\s*)*(.*)(\s\((PGP 
|)?Decrypted\))?$'%REGEXPBLINDMATCH='%OSUBJ'%SUBPATT='6'"


Regards

Peter
-- 
Peter Steiner <[EMAIL PROTECTED]>

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

You are subscribed as : archive@jab.org





Re: Regex Problem

2000-11-01 Thread Gerd Ewald

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello Peter Steiner !


On Wed, 1 Nov 2000 10:39:30 +0100 GMT your local time,
which was 01.11.2000, 10:39 (GMT+0100) where I live, you wrote:

[...]

> BTW: could anybody using S/MIME please tell the exact string inserted
> by TB when decrypting? Now the RE just removes the "(PGP Decrypted)"
> suffix...

Well, once the message is decrypted the following text is shown in the subject
field: "... (S/MIME Decrypted)".

But there is no decrypted copy created as it is when you decrypt a pgp-encrypted
message. At least, I couldn't find one!

HTH

- --
Best regards,
 Gerd
==
Using The Bat! Version 1.47 Halloween Edition
- 
PGP-Keys on request mailto:[EMAIL PROTECTED]?subject=send_key
- 
A living dog is better than a dead lion.

-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8
Comment: Digitally signed for authentication purposes ! Gerd Ewald

iQA/AwUBOf/aP0y/sHrVbGGHEQI4FACePfq3FsknG+BB/zJyW+ckh4SGV/UAoO4E
ubUuCKKWZStEw9vjQP+nXkf/
=LNoe
-END PGP SIGNATURE-

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

You are subscribed as : archive@jab.org





Re: Regex Problem

2000-11-01 Thread Christian Gassmann

Peter Steiner <[EMAIL PROTECTED]> wrote:

PS>> BTW: could anybody using S/MIME please tell the exact string
PS>> inserted by TB when decrypting? Now the RE just removes the "(PGP
PS>> Decrypted)" suffix...

> Oops, i got the wrong RE, it doesn't remove the Decrypted part. Try
> this one:

> 
> %subject="Re: %SETPATTREGEXP='(?i)(\:\s*)?(((Re|Aw|Antwort):|\[(Palm
> |palmcomp)\])\s*)*(.*)(\s\((PGP 
>)?Decrypted\))?$'%REGEXPBLINDMATCH='%OSUBJ'%SUBPATT='6'"
> 

Instead of "(PGP )?" use ".{3,6} " (as always w/o quotation marks).

HTH

-- 
Christian Gassmann

The Bat! 1.48 Beta/1 under Windows NT 4.0 Service Pack 6, RC 1.5

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

You are subscribed as : archive@jab.org





Re: Regex Problem

2000-11-01 Thread Dirk Heiser

Hi Dirk,

:-)

On Wed, 1 Nov 2000 00:31:49 +0100, you wrote:

[Subject Cleaning Regex]

DH> This all work fine for all cases i tryed, but if i use a Subjekt like
DH>Fwd: Test
DH> I get
DH>   Re: : Test
DH>  ^^

Thank for all replaying to this.

The ":?\s*" Work around Work fine. Now i am using this Regex for my
Replays:


%SUBJECT="%SETPATTREGEXP=""(?i)\A(?::?\s*)(?:(?:\s*(?:fwd|re|aw|fw|antwort|wg|forw)(?:\[\d*\])?:\s*)|(?:\s*\[(?:Palm|palmcomp)\]\s*))*(.*?)(?:(?:\s*\((?:was|war):.*\)\s*)|(?:\((?:PGP|S/MIME)
 Decrypted\)))*\z""%REGEXPMATCH=""%OSUBJ"""


This work fine in all cases for me.



I found out that the Problem that need this Work around are a Bug in
the %SUBJ and the %OSUBJ Macros. If the Subject Contain a "Fwd:" this
Macros return _not_ a Valid result. i.e. a Subject Like "Fwd: Test"
Return ": Test".

cu,
 Dirk

-- 
Using The Bat! 1.48 Beta/1 (S/N 12A1F196 / Educational) under Windows 95 4.0 Build 
  B

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





Small regex needed

2005-12-03 Thread Thomas Fernandez
Hello TBUDL,

Due to a little hickup I had recently, I lost one month' worth of
emails in my main account and have to reply out of the archive. My
setup is this:

1.) By way of X-Ray, every mail gets an additional header
X-Apparently-To: [EMAIL PROTECTED] if the mail was received
department1, or X-Apparently-To: [EMAIL PROTECTED] if the mail
was received by department2. And so on. This is also works for mails
that were just BCC'ed and for cross-postings, the X-Ray team built
this for me. (Thanks again.)

There are seven such departmental email addreses.

2.) All messages are copied into the archive, which is an account in
TB. By way of the above header, I can tell to which
account/email-address the message was originally sent. The archive
holds over 100,000 messages currently, neatly sorted into folders.

3.) The active accounts in TB are called "Department". For example,
"Department1" is for the email address [EMAIL PROTECTED]

4.) This is what I want to do: When I reply out of the archive, I want
the regex to extract the part before the "@" in the email address in
the header line start starts with "X-apparently-To:", so that the
account is set to the active (departmental) account. I now do that
manually by choosing account in the editor, but I want to automate it.

I want to use the output from the regex in an %Account= macro.
Something like this:

%SetRegexSource="Headers"
%FindLine_StartsWith: "X-Apparently-To:"
%ExtractPattern: "The part before @"
%Account= "Extracted pattern"

I hope the above pseudo-regex explains what I mean.

-- 
Thanks,

Thomas.



Current version is 3.62.14 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Regex-Tutorial Update

2003-09-06 Thread Gerd Ewald
Good evening Batsmen,

  I just want to let you know that I updated the Regex-tutorial on
  http://www.regenechsen.de/regex_en/regex_1_en.html and -of course-
  there is a PDF-download available.
  
  Together with Marck who helped me with the translation I added some
  regex-examples.

  Thanks to Marck who made this newer version possible.

  If you have any suggestions feel free to write via PM. THX.

-- 
Best regards,
 Gerd 
==
Tutorial for using regular expressions with TheBat! www.regenechsen.de

The 4 Basic Food Groups:  Ice Cream, Pizza, Coke and Women.

now playing: WDR2 :-)




Current version is 2.00 | "Using TBUDL" information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Need a RegEx

2001-09-24 Thread Raj

Fellow TB users,

I run my own placement company and have a web site.

I  have provided a for an e-mail id where visitors can submit their resumes. While the 
Web
site  has  its  own Auto Responder, its not as neat and easy to compose Auto 
Responders as
TB.

Hence  I  have  created  a  filter which will send a simple Thank you note. Of late I 
have
realized that some e-mail do NOT have a From Name. Its just the senders e-mail id.

In my reply template I have used

Dear %TOFNAME,

Hence in cases where there is no name the template does not read well.

What I want to do is create a RegEx if possible so that

In  mails  where  there  is  a  From Name I continue to address as above and in other 
case
change it to Dear Owner of Email ID ( The E-mail id can be picked up from %FromAddr)

Thanks in advance.

-- 
Best regards,
Raj  

mailto:[EMAIL PROTECTED]

Bumper Sticker : Honk if you love peace and quiet.


Composed on Monday, September 24, 2001 using TB Ver 1.53t


-- 

Archives   : http://tbudl.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
TBTech List: mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]
Latest Vers: 1.53d




Help with Regex

2002-04-22 Thread Absicherer

Hi, I subscribe to a newsletter which starts its message with

**Please visit our sponsors*
blah

**tips***
blah

**Please visit our sponsors*

all I want to keep is the 'tips' portion of the message. How can I setup a
rule using regex to extract that particular portion and delete the rest
nonsense. Thanks.



Current Ver: 1.60c
FAQ: http://faq.thebat.dutaint.com 
Unsubscribe: mailto:[EMAIL PROTECTED]
Archives   : http://tbudl.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
TBTech List: mailto:[EMAIL PROTECTED]




Suggestion (RegEx Tester)

2002-07-13 Thread Tack

Hi Bat Guys,

  In 'The Bat FAQ/Regular expression tutorial', several references are
  made to a 'regex tester'. I could find no links to a 'regex tester',
  but found the one (searching google) that gets integrated with the
  Bat's help dialog.

  I think this could be better documented?

-- 
Thanks, (Flying The Bat! 1.53d Under Win98se)
 Tack.  (on a PII 300Mhz with 96MB.)



Current Ver: 1.60q
FAQ: http://faq.thebat.dutaint.com 
Unsubscribe: mailto:[EMAIL PROTECTED]
Archives   : http://tbudl.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
TBTech List: mailto:[EMAIL PROTECTED]
Bug Reports: https://www.ritlabs.com/bt/



Help with Regex

2002-08-10 Thread Don Taylor

Hello,

I'm trying to write my first regex to "pretty up" the print template
for an account. I want to add a list of attachments at the bottom of
the message, in the form

Attachment 1
Attachment 2
...
Attachment n

The %ATTACHMENTS macro lists the names of files attached, using
semicolons and spaces, word wrapping over lines, like this:

Attachment 1; Attachment 2; ... Attachment n

What I want to do is substitute occurrences of "; " with newlines. I
tried setting the pattern and creating an expression, like this:

%SETPATTREGEXP="/;\s/\n/"
%REGEXPMATCH="%ATTACHMENTS"

But all I get is the newline, and none of the attachment text. How can
I accomplish the substitution?

-Don

Running The Bat! Version 1.61 on Windows 98 Build 



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



Re: RegEx question

2002-08-18 Thread Peter Palmreuther

Hello Sergey,

On Sunday, August 18, 2002 at 8:11:30 PM you [SU] wrote (at least in
part):

SU> ,- [  ]
SU> | %SETPATTREGEXP='(80)(.*s?)()'%REGEXPBLINDMATCH='%COMMENT'%SUBPATT='2'
SU> `-

I don't know what 's' in this string should match:

(.*s?) ... make is (.*?) and it should do it's job.
-- 
Regards
Peter Palmreuther
(The Bat! v1.61 on Windows 2000 5.0 Build 2195 Service Pack 1)

CanaDOS:  Yer sure, eh?  (B)eauty!  (N)o way!  (T)ake off!



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



No Subject Regex

2000-12-29 Thread Nick Danger

A plea to Regexers:

 Could someone come up with a Regex to input a predetermined subject
if replying to a message with a blank subject field?

 Doesn't seen like it would be too difficult, then again, I'm a regex
retard so my opinion is meaningless.

 Of course, maybe it's doable through macros all ready.  Shoot, after
three sleepless nights up with a sick one year old I'm too pooped to
even contemplate it.

  Pardon me while I allow my head to slam onto my desktop.

-- 
ò¸ó Nick [MUA: TB! 1.48h]
 Danger  [OS: Win98 4.10 1998]



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





Help with regex

2001-01-09 Thread Ulrich Peters

Hello,

is there any regex expert on this list? I can't figure out a solution
for my problem:

I have a filter which sends all messages for a specific topic into a
separate folder. No problem here.

Normally the first message received is generated with a FormMail
script, and I have set up a regex to create a reply with only the
relevant text of the FormMail. This text comes between the strings
"Comment: " and "Submit". Here is the regex which works well for this
purpose:


%QUOTES='%WRAPPED="%SETPATTREGEXP=""Comment:
(.*)Submit(.*)""%RegExpBlindMatch=""%TEXT""%SubPatt=""1"""'


The trouble is that there are normally subsequent messages to be
exchanged with this same person, and then the QUOTES should have to
work as they normally would, without using the regex. Using this regex
on further messages don't produce *any* quotations, because there is
no Comment/Submit match, obviously.

My problem is how to activate the regex and extract only part of the
message IF it comes from the FormMail, and how to make the quotes work
normally when the message does NOT come from the FormMail - using one
single message folder and same reply template for everything. I
couldn't figure it out.

Another thing I would like to know is how to eliminate empty lines
completely in the quoted text... with the same regex hopefully...?

Any ideas?

Cheers,
   Ulrich

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





Re: Regex Help

2001-01-11 Thread Januk Aggarwal

Hello Nick,

ND = Nick Danger 

On  Thu, 11 Jan 2001  at  16:56:24 GMT -0600 (which was 2:56 PM where
I live) witnesses say Nick Danger typed:

ND> Let me try another plea for help

ND> Is it possible to take today's date that is formatted 1/11/2001 by
ND> %DATESHORT and have it reformatted to a 20010111 style? (MMDD)

Try

%SETPATTREGEXP="\d{8}"%REGEXPMATCH="%SETPATTREGEXP=""(\d*)/(\d*)/(\d*)""%REGEXPBLINDMATCH=""%DATESHORT""%SUBPATT=""3""%SUBPATT=""2""%SUBPATT=""1"";;%SUBPATT=""3""0%SUBPATT=""2""%SUBPATT=""1"""

This is what it outputs for me: 20010111

-- 
Thanks for writing,
 Januk Aggarwal

 Using The Bat! 1.49
 under Windows 98 4.10 Build   A 

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

You are subscribed as : archive@jab.org





Re: Regex Help

2001-01-11 Thread Manfred Ell

On 11-01-2001 at 15:22:56GMT -0800 (which was 23:22 where I live)
Januk Aggarwal wrote regarding the subject of "Regex Help"


Hello Januk,

Januk> Try

Januk> 
%SETPATTREGEXP="\d{8}"%REGEXPMATCH="%SETPATTREGEXP=""(\d*)/(\d*)/(\d*)""%REGEXPBLINDMATCH=""%DATESHORT""%SUBPATT=""3""%SUBPATT=""2""%SUBPATT=""1"";;%SUBPATT=""3""0%SUBPATT=""2""%SUBPATT=""1"""

Januk> This is what it outputs for me: 20010111


It outputs "" (meaning nothing) here.

Regards

-- 
Manfred
___
[ TheBat 1.49c (FE1905D5), Windows 5.0 Build 2195 Service Pack 1, RC 1.1 ]



Politeness is asking a beggar if he'll take a check.

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





Re: Regex Help

2001-01-11 Thread Januk Aggarwal

Hello Manfred,

ME = Manfred Ell 

On  Thu, 11 Jan 2001  at  23:32:02 GMT + (which was 3:32 PM where
I live) witnesses say Manfred Ell typed:

ME> It outputs "" (meaning nothing) here.

Did you use cut and paste to put it into your QT?  If not, did you
accidentally use %REGEXPBLINDMATCH instead of %REGEXPMATCH?  Are all
the quotation marks correct?

I cut and pasted this one into a QT, and this is the output: 20010111

What is the output of the %ODATESHORT macro on your system?  If it is
not digits separated by '/', the regexp will fail.

-- 
Thanks for writing,
 Januk Aggarwal

 Using The Bat! 1.49
 under Windows 98 4.10 Build   A 

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

You are subscribed as : archive@jab.org





Re: Regex Help

2001-01-11 Thread Nick Danger

Subject: Regex Help
   From: Januk Aggarwal
  Dated: Thu, 11 Jan  2001, 15:22:56 (5:22:56 PM Local)
~~

Hi Januk,

J> Try

J> 
%SETPATTREGEXP="\d{8}"%REGEXPMATCH="%SETPATTREGEXP=""(\d*)/(\d*)/(\d*)""%REGEXPBLINDMATCH=""%DATESHORT""%SUBPATT=""3""%SUBPATT=""2""%SUBPATT=""1"";;%SUBPATT=""3""0%SUBPATT=""2""%SUBPATT=""1"""

J> This is what it outputs for me: 20010111

Worked like a charm!  A thousand thanks for making a mundane task
automated for me.  You're my hero for the day!

-- 
|-|-|
| ò¸ó Nick|   "All the world's a game,  |  
|  |
|  Danger |   and we are just niggly bits"© |
|-|-|
| "We don't stop playing when we grow old,  |
| We grow old when we stop playing" |
|---|
  MUA: The Bat! V:1.49 Beta/1



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





Re: Regex Help

2001-01-12 Thread Manfred Ell

On 12-01-2001 at 18:00:27GMT -0800 (which was 2:00 where I live)
Januk Aggarwal wrote regarding the subject of "Regex Help"


Hello Januk,

ME>> It outputs "" (meaning nothing) here.

Januk> Did you use cut and paste to put it into your QT?  If not, did you
That's what I did. I copied it 100% into my test QT.

Januk> accidentally use %REGEXPBLINDMATCH instead of %REGEXPMATCH?  Are all
Januk> the quotation marks correct?
Yep.

Januk> I cut and pasted this one into a QT, and this is the output: 20010111

Januk> What is the output of the %ODATESHORT macro on your system?  If it is
Januk> not digits separated by '/', the regexp will fail.
12-01-2001
Separator different, so this is it.
Changing the regexp results: 20010112

Perhaps you could change the regexp to be generic regardles of the
separator (/ in the US, DE etc, - in PT and perhaps there are others)

Regards

-- 
Manfred
___
[ TheBat 1.49c (FE1905D5), Windows 5.0 Build 2195 Service Pack 1, RC 1.1 ]



Where do Ravens go for a drink?Crow Bars.

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





Januk - Regex bug?

2001-01-12 Thread Nick Danger

Hi Januk,

  That regex string you created for me yesterday:

%SETPATTREGEXP="\d{8}"%REGEXPMATCH="%SETPATTREGEXP=""(\d*)/(\d*)/(\d*)""%REGEXPBLINDMATCH=""%DATESHORT""%SUBPATT=""3""%SUBPATT=""2""%SUBPATT=""1"";;%SUBPATT=""3""0%SUBPATT=""2""%SUBPATT=""1"""

Worked great yesterday, but today it's putting out:  20010121 instead
of: 20010112

I'm guessing something is swapping the date numbers and since
yesterday was 11 it didn't show up.

Is this something easy to fix?

TIA

-- 
ò¸ó Nick [MUA: TB! 1.49]
 Danger  [OS: Win98 4.10 1998]



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





How to... - regex

2001-01-22 Thread Lija

Hello,

On every mailing list (ie. ListBot, eGroups...) there is an advertisment like this
one (example from ListBot):

--- ListBot Sponsor --
  Dial 800-555-TELL. Instant updates - One free call.
  Sports, stocks, driving directions...& much more!

   http://www.bcentral.com/listbot/tellme1
--

Is there any regex that can help me to remove this when replying?
Advertisments are pretty 'constant' - 6 rows, first one and the last are common.

So, I need a regex that will search from this first line and delete this and 5 rows
afterward. Can you write it for me, please!


-- 
Best Regards,
Lija, YUPCExpert-Owner
[EMAIL PROTECTED]



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

-- 
__
Archives   : <http://tbudl.thebat.dutaint.com>
Moderators : <mailto:[EMAIL PROTECTED]>
TBTech List: <mailto:[EMAIL PROTECTED]>
Unsubscribe: <mailto:[EMAIL PROTECTED]>

You are subscribed as : archive@jab.org





Simple regex request

2001-01-30 Thread Elden Fenison

TBUDL,

  I hope that this request is simple enough that I can post here
  as opposed to TBTECH. I don't know much at all about regular
  expressions, but I'd like to request one that I can use with my
  reply templates.

  The default reply template uses %OFromFName as the greeting.
  What I would like to do is use the first name in my address
  book entry for the original author if one exists, otherwise go
  ahead and use the %OFromFName.

  Many thanks in advance.

-- 

 -=Elden=-
 http://www.moondog.org



-- 
__
Archives   : 
Moderators : 
TBTech List: 
Unsubscribe: 

You are subscribed as : archive@jab.org





Re: Sorry!!! ( RegEx)

2001-03-09 Thread Gerd Ewald

Hello Gerd Ewald !

 
On Sat, 10 Mar 2001 00:05:00 +0100 GMT your local time,
which was 10.03.2001, 00:05 (GMT+0100) where I live, you wrote:

> I tested it with some test text without errors. But as I'm a beginner
> in Regexp I will not guarantee for nothing :-)



I'm sorry. It is obviously too late: this topic belongs to TBTech and
I forgot to move the thread. Beg your pardon!

Will go to bed now Zzzzh

-- 
Best regards,
 Gerd 
==
Using The Bat! Version 1.51
PGP-Keys on request mailto:[EMAIL PROTECTED]?subject=send_key

Erwerbsregel #59
Guter Rat ist teuer.



-- 
__
Archives   : 
Moderators : 
TBTech List: 
Unsubscribe: 

You are subscribed as : archive@jab.org





List of REGEX

2001-05-20 Thread Urke

Hello TBUDL,

Where I can get full list of REGEX commands, except in HELP that
coming with full installation of The Bat?

-- 
Urke from Serbia
 mailer: The Bat! v1.53 Beta/8
 OpSys:  Windows 98 4.10 Build   A 
 System: Cyrix 200+ 16MB EDO


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

-- 
__
Archives   : <http://tbudl.thebat.dutaint.com>
Moderators : <mailto:[EMAIL PROTECTED]>
TBTech List: <mailto:[EMAIL PROTECTED]>
Unsubscribe: <mailto:[EMAIL PROTECTED]>

You are subscribed as : archive@jab.org





Re[2]: regex

2001-05-31 Thread OK3

Hello, the Bat! list recipients,

Thursday, May 31, 2001, Januk Aggarwal wrote to Thomas about
regex:

JA> %ABtoMEMO %ABtoFIRSTNAME ^^ ^^

Why not use %ABtoNamePrefix %ABtoFIRSTNAME?

-- 
Best regards,
Oleg Zalyalov. mailto:[EMAIL PROTECTED]

  Using The Bat! version 1.52f
  under Windows NT 4.0 Build 1381 Service Pack 6

-- 
__
Archives   : <http://tbudl.thebat.dutaint.com>
Moderators : <mailto:[EMAIL PROTECTED]>
TBTech List: <mailto:[EMAIL PROTECTED]>
Unsubscribe: <mailto:[EMAIL PROTECTED]>

You are subscribed as : archive@jab.org





Help: Regex reply

2006-09-24 Thread Stuart Cuddy
Hello TBUDL,

  I am not positive that the following can be done, but if any e-mail
program can do I'm sure Thebat is the one. :)

I am going to be receiving an e-mail generated from a form on a web
page that will have the following layout:
-
Jim, Jones, 111 Portage Ave, Winnipeg, MB, R0G 2J0, 204-555-4463,
[EMAIL PROTECTED], , Tech-P, Burntwood
- I
I need to send an e-mail to the e-mail address in the message and it
needs to contain a login name and password. The login name in this
case will be Jones which as you can see combines two of the fields
and the password is .

Is it possible to send this e-mail saying that they have successfully
applied to enter this site and can use Jones as the login name and
 as the password.

I'm assuming that if it can be done it will use regex, which I am only
barely familiar with and I will need patient advisors.

TIA
-- 
Best regards,
 Stuart   mailto:[EMAIL PROTECTED]
 Using The Bat! v3.85.03
  
 On Windows XP 5.1 Build #2600



Current version is 3.85.03 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Regex Page down

2006-09-24 Thread Stuart Cuddy
Hello tbudl,

I tried going to the TB! Regex Macro Repository page listed at
http://www.silverstones.com/thebat/TBUDLInfo.html and received the
following:

The Bat! Macro and Solutions Library The Bat! counter Fatal error:
Maximum execution time of 30 seconds exceeded in
D:\Data\wwwroot\cgi\library.php on line 40

-- 
Best regards,
 Stuart   mailto:[EMAIL PROTECTED]
 Using The Bat! v3.85.03
  
 On Windows XP 5.1 Build #2600



Current version is 3.85.03 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re: Regex Macro Help

2004-01-14 Thread Jonathan Angliss
On Wednesday, January 14, 2004, Patrick G. wrote...

> I have the following regex which works fine in RegExTest

>   ^\".{2,}\"\s\-{2}.{20}

> But when I add it to a macro filter to extract this match to a file

> %REGEXPTEXT="^\".{2,}\"\s\-{2}.{20}"

> I get the followng error:

>  *** Error: \ at end of pattern ***.{2,}\"\s\-{2}.{20})"

You might want a quick change... you have multiple "" in there, that
might cause an issue.  Try it like this:

  %REGEXPTEXT='^\".{2,}\"\s\-{2}.{20}'

That way the ' enclose the " and make them part of the search instead
of the first and second being matched for each other, and splitting
the regex in a weird way.

-- 
Jonathan Angliss
([EMAIL PROTECTED])

paranoia: believing this tagline is about you.


pgp0.pgp
Description: PGP signature

Current version is 2.02.3 CE | "Using TBUDL" information:
http://www.silverstones.com/thebat/TBUDLInfo.html

Re: Regex Macro Help

2004-01-15 Thread Urban
Thursday, January 15, 2004, Patrick G. wrote:

> %REGEXPTEXT="^\".{2,}\"\s\-{2}.{20}"

> I get the followng error:

>  *** Error: \ at end of pattern ***.{2,}\"\s\-{2}.{20})"

>  Perhaps I've been at this too long this evening, but even after
>  searching teh archives and reading the RegEx tutorial, I can not
>  figure out what I'm doing wrong.

The double double quotes may (should) be confusing your regexp-machine.
Try %REGEXPTEXT='^\".{2,}\"\s\-{2}.{20}'

-- 
Urban

In spring, the salmon swim upstream to spoon.


Current version is 2.02.3 CE | "Using TBUDL" information:
http://www.silverstones.com/thebat/TBUDLInfo.html


regex/macro help needed

2004-08-28 Thread Jurgen Haug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hallo Fledermäuse,

I have a little problem with a subject-modifier macro and need some help.

Thank you for looking here: http://www.safaribears.de/help/regex.html

;-)

- --
regards,
 Jürgen
:eu-flag3: :de-bw:

"There are none so blind as those who will not see"

Using The Bat! v2.12.03, Opera v7.54.3865 on Win.XP.5.1.2600.SP1

* PGP key available on request: send mail with subject 'PGP key request'
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.3 (MingW32)

iD8DBQFBMLZ0oXyU9LPZSMERAqBxAJ415Mq/piIQV4ymYqLZJK06oAUbawCgjuiA
YJObCoxxPYa3rtcSq8gvXUY=
=GvtP
-END PGP SIGNATURE-



Current version is 2.12.00 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Regex guru advice needed

2000-09-25 Thread Arnie

Hi all,

Slowly (very slowly) the power of regular expressions is sinking into
my pysche.  Having said this I still haven't had the time to do more
than glance at my copy of "Mastering Regular Expressions" and I was
hoping some kind soul would be able to point me in a general
direction.

I need to be able to extract text that spans multiple lines.

i.e.

   #This is line 1
This is line 2
This is line 3~

I need to extract everything between the "#" and the "~".  I can find
the beginning of the line but I can't figure out the way to continue
until the "~" and stop.  Everything I try either stops at the end of
the first line or selects *everything* after the first line even though
I don't need everything.

Any help would be greatly appreciated.  Children will be renamed in
your honor.  Just ask little Ming-Li (previously Max) and little Januk
(previously Zoe).

Arnie



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

You are subscribed as : archive@jab.org





How to RegEx this...

2004-10-07 Thread admin
This is an incoming email:
=
An online order has been placed on the atm.org.uk web site.

REF: ATM-10XXX73
DATE: 01-10-2004
TIME: 16:07:57

Membership Num: 
Name: Arty Bloggs
CAddress: 4 Deeping Ave.
Cheltenham
Postcode: FD31 5SD
Telephone: 01987 112233
E-mail: [EMAIL PROTECTED]
DAddress: 4 Deeping Ave.
Cheltenham
FD31 5SD

*** ITEMS ORDERED ***

1 x Membership ATM Student Sep 04 - Aug 05 (ID memstu)

POSTAGE OPTION: UK
POSTAGE COST: £0.00
TOTAL: £19.50

SPECIAL REQUESTS: 

NEWSLETTER: YES

===

I want to extract the item or items bought and send out an email that
cays stuff like: 'Thank you for your order for

Item 1
Item 2

We will blah blah blah.

Some more blah.

etc

and send it to the email address given and it says Dear Arty Bloggs at
the beginning.

Is there a RegEx head out there could whack the code together
sufficient for me to tweak it - despite the books and Google - I can't
even get started. If someone wouldn't mind starting me off...

And I also need to see exactly how to place the RegEx in a template.

Maybe someone's got one already made that does something like this?

It's always *** ITEMS ORDERED *** newline, newline

and newline, newline at the end of the items. Each item on a newline
in between.

-- 
Marten Gallagher
Annery Kiln Web Design
www.annerykiln.co.uk
Using The Bat! 3.0
on Windows XP 5.1 


[EMAIL PROTECTED]




Current version is 3.00.00 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Yet another RegEx question

2005-06-21 Thread Spike
Hello tbudl,

OK, a RegEx question:

I am receiving hundreds of spam messages that contain the following
text, with the numeric part in the brackets varying endlessly -

"Re: [1/53]: Reday 2 Odrer olinne"

How do I pattern match the "[1/53]" and all the endless numeric and
text variations to send them expeditiously to my spam folder?  I've
read the help files and just can't seem to get it right.  The brackets
and the numbers combination vary, with up to 3 numeric characters
either side of the forward slash.

-- 
Warmest tropical wishes,
Spike

/"\   ASCII Ribbon Campaign - Against HTML Mail
\ /   If it aint a webpage it shouldn't be HTML. 
 XSay NO! to bloatmail - ban HTML mail!
/ \   Ask Spikey, he hates everything (HTML),
  especially the new AOL implementations!

--
Using TheBat! v2.12.00 hamstrung by Windows XP PRO
5.1 Build 2600 Service Pack 2 - on a Toshiba
Satellite P75-S5261 / P4-3.2GHz with 2GB RAM /
200GB HDD (100GB X2)
--



Current version is 3.5.25 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re: Small regex needed

2005-12-04 Thread Roelof Otten
Hallo Thomas,

On Sun, 4 Dec 2005 10:10:40 +0700GMT (4-12-2005, 4:10 +0100, where I
live), you wrote:

TF> I want to use the output from the regex in an %Account= macro.
TF> Something like this:

TF> %SetRegexSource="Headers"
TF> %FindLine_StartsWith: "X-Apparently-To:"
TF> %ExtractPattern: "The part before @"
TF> %Account= "Extracted pattern"

You mean something like this?
%Account='%-
%SetPattRegExp="(?m-s)^X-Apparently:\s(.*/?)@company.com"%-
%RegExpBlindMatch="%Headers"%-
%SubPatt="1"%-
'%-

Didn't test it, so that's up to you. I don't have any messages with an
X-Apparently header. Note that my first draft of any given regexp uses
to contain typos.

Other solutions are possible, like when you've defined X-Apparently as
header in TB.

-- 
Groetjes, Roelof

He says a thousand pleasant things, but never "Adieu."

The Bat! 3.63.06 (Beta)
Windows XP 5.1 Build 2600 Service Pack 2
1 pop3 account, server on LAN
OTFE enabled
P4 3GHz
2 GB RAM


pgpltkTkGhHFb.pgp
Description: PGP signature

Current version is 3.62.14 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html

Re: Small regex needed

2005-12-04 Thread Thomas Fernandez
Hello Roelof,

On Sun, 4 Dec 2005 09:50:32 +0100 GMT (04/12/2005, 15:50 +0700 GMT),
Roelof Otten wrote:

RO> You mean something like this?
RO> %Account='%-
RO> %SetPattRegExp="(?m-s)^X-Apparently:\s(.*/?)@company.com"%-
RO> %RegExpBlindMatch="%Headers"%-
RO> %SubPatt="1"%-
RO> '%-

Yes, this sounds about right. I will test it in the office on Tuesday.

RO> Other solutions are possible, like when you've defined
RO> X-Apparently as header in TB.

Yes, I have. If the above doesn't work, I'll be back.

-- 

Cheers,
Thomas.

SYMPTOM: Beer tasteless, front of your shirt is wet. FAULT: Mouth not
open, or glass applied to wrong part of face. ACTION: Retire to
restroom, practice in mirror.
http://thomas.fernandez.hat-gar-keine-homepage.de/

Message reply created with The Bat! 3.63.06 (Beta)
under Windows XP 5.1 Build 2600 Service Pack 2




Current version is 3.62.14 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re: Small regex needed

2005-12-06 Thread Thomas Fernandez
Hello Roelof,

On Sun, 4 Dec 2005 18:13:35 +0700 GMT (04/12/2005, 18:13 +0700 GMT),
Thomas Fernandez wrote:

TF> Yes, this sounds about right. I will test it in the office on Tuesday.

Test successful. Thanks a lot.

-- 

Cheers,
Thomas.

The closest I ever got to a 4.0 in high school was my blood alcohol
content.
http://thomas.fernandez.hat-gar-keine-homepage.de/

Message reply created with The Bat! 3.63.06 (Beta)
under Windows XP 5.1 Build 2600 Service Pack 2





Current version is 3.62.14 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re: Regex-Tutorial Update

2003-09-06 Thread Greg Strong
Hello Gerd,

>   I just want to let you know that I updated the Regex-tutorial on
>   http://www.regenechsen.de/regex_en/regex_1_en.html and -of course-
>   there is a PDF-download available.

Thanks!

-- 
Best regards,

Greg Strong

Using The Bat! v2.00 on Windows XP 5.1 Build  2600
Service Pack 1



Current version is 2.00 | "Using TBUDL" information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Question concerning the RegEx

2001-09-10 Thread Roland Burger

Hi,

on Mon, 10 Sep 2001 13:13:10 +0200 GMT (which was 10.09.2001, 13:11
+0100 GMT where I live) Marck D Pearlstone wrote:
^
Why I got this? At the moment in Germany is summertime and correctly
it must be +0200 GMT. Also I have a time difference of two minutes
though I have NASA-time on my computer!

Here is my RegEx:


%WRAPPED='on%SETPATTREGEXP="(?m-s)Date\:\s*?((.*?[\d]{4})\s*?([\d]{0,2}
\:[\d]{0,2})\s*?(.*))"%REGEXPMATCH="%HEADERS" GMT (which was %ODateShort,
%OTime +0100 GMT where I live) %OFromName wrote:'


For any help thank you very much in advance!

-- 
Best regards,
Roland  mailto: [EMAIL PROTECTED]

PGP-Key: 0x0D023C45
Homepage: http://www.rolandburger.de

I use The Bat! v1.53t under Windows 98 4.10 Build   A !


-- 

Archives   : http://tbudl.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
TBTech List: mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]
Latest Vers: 1.53d




Re: Need a RegEx

2001-09-24 Thread Lars Geiger

Hi Raj,
On Mon, 24 Sep 2001, at 18:13:24 +0530, you wrote:

R> What I want to do is create a RegEx if possible so that

No RegExp needed for this task if I understood you correctly.

R> In mails where there is a From Name I continue to address as above
R> and in other case change it to Dear Owner of Email ID (The E-mail id
R> can be picked up from %FromAddr)

Try this one as your greeting:

%IF:"%OFROMFNAME"="":"Dear Owner of %OFROMADDR":"Dear %TOFNAME"

HTH

-- 
Regards,
Lars

The Bat! 1.54 Beta/9 on Windows NT 5.0 Build 2195 Service Pack 2
 
|Lars Geiger  |  <mailto:[EMAIL PROTECTED]>|


-- 

Archives   : http://tbudl.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
TBTech List: mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]
Latest Vers: 1.53d




Re: Need a RegEx

2001-09-24 Thread Januk Aggarwal

Hello Lars,

An archeological dig discovered that on Monday, September 24, 2001 at
17:35 GMT +0200, Lars Geiger [LG] typed the following:

LG> Try this one as your greeting:

LG> %IF:"%OFROMFNAME"="":"Dear Owner of %OFROMADDR":"Dear %TOFNAME"

Judging by my tests, %OFROMFNAME and %OFROMLNAME return the username
part of the email address when there is only an address.  This means
Raj won't get what he wants with that condition.

There is a simple extension of your idea though:

%IF:'%SETPATTREGEXP="@"%REGEXPMATCH="%OFROMNAME"'='@':'%-
Dear Owner of %OFROMADDR':'%-
Dear %OFROMFNAME'%-

-- 
Thanks for writing,
 Januk Aggarwal

Using The Bat! 1.54 Beta/8 under Windows 98 4.10 Build  A

I simply wasn't cool enough for them (whomever they were) to offer
drugs to me.  Drugs were everywhere, that's what the TV said.  I could
get offered drugs at any time.  Yeah, right. -- J. Sullivan


-- 

Archives   : http://tbudl.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
TBTech List: mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]
Latest Vers: 1.53d




Re: Need a RegEx

2001-09-24 Thread Thomas F

Hi Raj,

On Tue, 25 Sep 2001 09:52:59 +0530GMT (25/09/2001, 12:22 +0800GMT),
Raj wrote:

JA>> There is a simple extension of your idea though:

JA>> %IF:'%SETPATTREGEXP="@"%REGEXPMATCH="%OFROMNAME"'='@':'%-

IF there is a "@" character in the %OFromName then...

JA>> Dear Owner of %OFROMADDR':'%-

...write "Dear Owner of [EMAIL PROTECTED]"

else...

JA>> Dear %OFROMFNAME'%-

write "Dear Paul"

R> I still clueless at what this does But it serves my purpose and I am happy.

I translated it into English and hope it is a bit clearer now. The
trick is: if there is no Real Name in the from address, the makro
%OFromName will return the sender's address (as you have noticed).
Unless you know people with the @ character in their real names, any
match of this character in the value returned by the makro means that
there was no Real Name.

-- 

Cheers,
Thomas.

Moderator der deutschen The Bat! Beginner Liste. Anmeldung unter:
[EMAIL PROTECTED]  

Message reply created with The Bat! 1.53t
under Chinese Windows 98 4.10 Build 1998  
on a Pentium II/350 MHz.


-- 

Archives   : http://tbudl.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
TBTech List: mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]
Latest Vers: 1.53d




Re: Need a RegEx

2001-09-25 Thread Lars Geiger

Hi Januk,
On Mon, 24 Sep 2001, at 11:53:58 -0700, you wrote:

JA> Judging by my tests, %OFROMFNAME and %OFROMLNAME return the username
JA> part of the email address when there is only an address. This means
JA> Raj won't get what he wants with that condition.

OK, I must admit I didn't do extensive testing... :-( I just thought
that %OFROMFNAME would return an empty string when there's no name
present. And, obviously, I was wrong. :-/

JA> There is a simple extension of your idea though:

JA> %IF:'%SETPATTREGEXP="@"%REGEXPMATCH="%OFROMNAME"'='@':'%-
JA> Dear Owner of %OFROMADDR':'%-
JA> Dear %OFROMFNAME'%-

Hmmm, so %OFROMNAME returns the complete address when there's no name
part right? That's an interesting way of doing this. And you are
wondering about your reputation on this list... :-)

-- 
Regards,
Lars

The Bat! 1.54 Beta/9 on Windows NT 5.0 Build 2195 Service Pack 2
 
|Lars Geiger  |  |


-- 

Archives   : http://tbudl.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
TBTech List: mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]
Latest Vers: 1.53d




Re: Need a RegEx

2001-09-25 Thread Januk Aggarwal

Hello Lars,

An archeological dig discovered that on Monday, September 24, 2001 at
23:52 GMT +0200, Lars Geiger [LG] typed the following:

LG> OK, I must admit I didn't do extensive testing... :-( I just
LG> thought that %OFROMFNAME would return an empty string when there's
LG> no name present. And, obviously, I was wrong. :-/

Well, yours is the logical assumption.  Actually, before testing, I
assumed they would return the full address like %OFROMNAME does.

LG> Hmmm, so %OFROMNAME returns the complete address when there's no
LG> name part right?

Correct.

LG> That's an interesting way of doing this. And you are wondering
LG> about your reputation on this list... :-)

  ;-)

-- 
Thanks for writing,
 Januk Aggarwal

Using The Bat! 1.54 Beta/8 under Windows 98 4.10 Build  A

I simply wasn't cool enough for them (whomever they were) to offer
drugs to me.  Drugs were everywhere, that's what the TV said.  I could
get offered drugs at any time.  Yeah, right. -- J. Sullivan


-- 

Archives   : http://tbudl.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
TBTech List: mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]
Latest Vers: 1.53d




guide on bat regex

2002-01-15 Thread Nicholas

Hello TBUDL,

  is there a guide for using the bats regex thing?

-- 
Best regards,
 Nicholas  mailto:[EMAIL PROTECTED]


-- 

Archives   : http://tbudl.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
TBTech List: mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]
Latest Vers: 1.53d
FAQ: http://faq.thebat.dutaint.com 




[regex-tutorial]: Part 1

2002-05-13 Thread Gerd Ewald

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Bats(wo)men,

some days ago Daniel Grunberg asked for an English version of a
tutorial on regular expressions (TBTECH,
<mid:[EMAIL PROTECTED]>) which I published on
www.pro-privacy.de for the German beginners list.

First thing I did was a mail to Marck to find out whether there is
some interest in a translation.

Well, here it is. At least the first part. Marck checked the text and
transformed it into something you can read. Thank you, Marck! (My
translation was something between the following text and a translation
altavista did, hehe).

The whole tutorial will be subdivided in five parts. It will take some
time to prepare the next part, so you have to wait one or two weeks
for the next part to be published. Sorry! Anyway, we decided to
publish it in parts, so you can start learning regexian and you have a
chance to ask questions for better understanding.

Any part is posted to TBUDL using a special subject ("[regex
tutorial]") so that those of you who don't want to read it may define
a filter to kill the mail. Please use the same prefix in your subject
for any reply.

The tutorial is published on www.pro-privacy.de (look there for
"special") and on Marck's official FAQ at
http://www.silverstones.com/thebat/FAQ.html


Ok, that's it. Let's start. I hope you will enjoy the tutorial :-)


START OF PART 1 ==

1. Introduction

Whenever I came across something interesting in a mail that was
created with TheBat! like "cleaned" Subject-strings or automagically
deleted PGP-lines, I would ask in one of the mailing lists: "How did
you do that?". Quite often I would receive a reply like "You will need
a regex for that!" And sometimes the result was something like:

%QUOTES="%SETPATTREGEXP=""(?is)(-BEGIN PGP
SIGNED.*?\n(Hash:.*?\n)?\s*)?(.*?)(^(- --|--\n|-BEGIN PGP
SIGNATURE)|\z)""%REGEXPBLINDMATCH=""%text""%SUBPATT=""3"""

This is only a simple example of those cryptic looking combinations of
TB!-Macros and regular expressions which are simply called "regex" by
the TB-experts. To me it seemed a random sequence of characters; as if
a cat walked across my keyboard. Awkward, arbitrary and cryptic, that
at least was my impression until Januk Aggarwal (special thanks to
him) gave me a short introduction to regex at TBTECH and my workmate
Alfred Rübartsch gave me a copy of Jeffrey Friedls excellent book
"Mastering Regular Expressions".

Although I entered the fascinating world of Regular Expression with
the help of these two, I am still not an expert in the "regexian"
language. Anyway, as an advanced beginner, I have dared to write this
tutorial to hopefully explain some things and give a good start in
"Regular Expressions" to other beginners.

This tutorial is meant to bring you into closer contact with the regex
topic. Well, let's see how it works; let's see whether we will be able
to explain the "regex"-example above by the time we come to the end of
this tutorial.


2. Regular Expressions

2.1. What does "Regular Expression" mean?

Regex are not only used in TB! You can find them in quite a lot of
different UNIX-tools (e.g. grep), in some programming languages like
PERL (Practical Extraction and Report Language, sometimes called
'Pathologically Eclectic Rubbish Lister' ) and even my editor
UltraEdit uses them.

Laura Lemay wrote in her book "PERL in 21 days" that the term "Regular
Expression" makes no sense at first sight (to be honest: even at
second sight it still makes no sense to me), because these are not
real expressions and furthermore no one really can explain why they
are "regular"! Well, let's ignore this; let's simply accept that the
term "Regular Expression" has its origin in formal algebra and that
they are indeed part of Mathematics.

The easiest and most convenient way to define "Regular Expression" is
to say: "They are search patterns to match characters in strings."

Those of you who have tried to find files using the DOS command line
or the search function in the Explorer may have used patterns like:

dir *.doc
copy *.??t c:\temp

These examples show patterns that consist of letters, stars, question
marks and other characters to define which files should be listed or
copied. In the first example only files that have the suffix "doc"
should be listed. In the second example only files that have a
three-letter suffix and a "t" as last character in the suffix should
be copied.

But these regex are merely wildcards! In no way as mighty as "Regular
Expressions". One can't compare them to real regex, which offer much
more than wildcards for characters.


3. Simple Patterns

To explain some regular 

[regex-tutorial]: Part 2

2002-05-20 Thread Gerd Ewald

Hi Batsmen,

this is the second part of the regex tutorial. This time we will learn
something about special meta characters which anchor the search
pattern like line and word boundaries. Furthermore you will be able to
use alternatives in search patterns.

The third part is in preparation. To let you know what comes next in
*Part 3*: it will explain quantifiers, groups, subpatterns.

But let's start with part 2 which will be online soon
at http://www.silverstones.com/thebat/Regex.html and
www.pro-privacy.de

=

4. Complex Patterns

Ok, that was an easy start! But it wasn't very interesting, was it?
But if simple search patterns were all that "Regular Expressions"
offer, it wouldn't be worth a tutorial.

So, there has to be more! Okay, let's get going with the more
complicated stuff:

4.1 Line Boundaries

Instead of having a regex look for text anywhere in the string we can
force it to search in specific parts of the string. These "anchored"
patterns have their own metacharacters: ^ and $ The circumflex ^ means
that the search pattern is anchored to the start of the line; the
dollar $ means that the regex will look for the pattern at the end of
a line (Yes, dear experts, for now, let's take a string as one line.
Ok?)

Example: "^give or take" This pattern will only be matched if 'give'
is at the beginning of a line and is followed by 'or take'.

Or: "This is the end$" is only matched if it appears at the end of the
line. It doesn't matter what comes first: 'This is the end' has to be
the end of the line!

You can use these two metacharacters to speed up the regex. I admit,
it is not all that important when you use regex in TB! because you
won't be working with large amounts of data. But on the other hand: it
can't hurt anyone ;-) Why does the regex work faster if you use the
circumflex or the dollar, you ask? Ok, let's use our example regex
"^give or take" on the string 'Once upon a time': the regex machine
checks whether the first thing it finds is the beginning of the line.
This returns TRUE. Next it checks the following character whether it
is a 'g'. The search process is cancelled at once because this returns
FALSE! Now what would have happened without the circumflex? The regex
machine would have checked the second, third, fourth etc. character to
match the search pattern, only to find out that the search pattern
doesn't exist in that string. The longer the string, the more time the
regex machine takes to fail ;-)

4.2 Word Boundaries

But there is more that regexian offers. Word boundaries! Some people
forget about this because they think there is another way to define
word boundaries. Believe me, there is, but it's nowhere near as easy
as this!

"\b" makes the regex searching for the pattern at word boundaries:
"\bgive or take".

Hey, we know this one, don't we? That is our first example again! The
pattern that was found in 'You have to forgive or take the
consequences!' but now won't be found thanks to the word boundary
metacharacter.

I remember a discussion in one of the German TB-lists where someone
asked why this metacharacter is necessary, because a word could be
recognized by surrounding spaces. This is not a good idea: words could
end at question marks, exclamation marks, a full stop A regex like
"ain " would indeed match 'Again a good idea' but wouldn't find 'Oh
no, not again.' You can avoid that when you use "\b" instead.

Of course, this metacharacter can be negated, as can the others: "\B"
which means that the regex should match characters everywhere in a
string other than at word boundaries.

Another example should explain this: "Re\B." The regex has to match
the characters 'Re' as long as they are not a word boundary, followed
by any other character (the dot). Now, we have the string: 'Re: or
Reply:'. Try it in the regex tester. What happens? The result is
'Rep'. Replace \B by \b and the regex matches 'Re:'. Everything clear
now?

4.3 Alternatives

You remember the first example in this tutorial "give or take"? When I
introduced it I made the redundant remark that this regex wouldn't
match 'give' OR 'take'. Well, this remark wasn't really redundant: I
needed something to start this chapter, some kind of transition .
Because this is the chapter that explains how we can use the OR; how
alternative patterns are defined.

To search for alternative patterns, regexian offers a special
metacharacter: it is the vertical bar or may be better known as
pipe-symbol "|". So, what would have been necessary to search for
'give' or 'take'? "give|take". The regex checks whether it matches
'give

[regex-tutorial]: Part 3

2002-05-26 Thread Gerd Ewald

Hi everyone,

this is the third part, which was the most difficult to translate. Ask
Marck, without him it wouldn't be like that. Thank you again, Marck
:-) There are some very long regular expressions in this part. They
might be wrapped due to layout reasons. Sorry for that!

The fourth part will be delayed because I won't be at home for a week
and no chance to work on part 4. So, sorry for that, but you have to be
patient. Anyway, I think part 3 is quite difficult and you will need
some time to work through.

Good luck.

===Start

5. Special Elements  - Part 1

Everything we've had so far hasn't been too difficult. But this
chapter is heavy stuff. Please, do me a favour: read this chapter
carefully. Be patient! Try everything with the regex tester; get
familiar with the elements in this chapter: they are the essential for
creating proper regex. Although this may be a bit more complicated
than the chapters before, it is certainly more interesting ;-)

5.1 Quantifier

We already know to define patterns for matching single characters,
groups of characters, character classes or ranges of characters. We
can use alternatives in our search patterns. But something of
absolutely vital interest is missing - the ability to define
repetitions.

You remember the example that was a regex to search for the European
formatted date:

"\d\d\.\d\d\.\d\d\d\d"

For every single digit we wrote "\d". Isn't there another way, much
simpler than repeating the metacharacter as often as the regex wants
to find the character? Yes, there is! There are quantifiers!

+ * ? are the most important quantifiers. 


The "+"-character means that the character preceding the plus-sign has
to appear at least once at the specific point of the string. "fo+l"
matches 'fool', 'fol' and 'fol'. "Re:\s+", for example, means that
at least one whitespace has to follow 'Re:' to be matched.

I hear some of you experts: yes, the usage of quantifiers is not only
restricted to characters. You can use them to repeat metacharacters,
character classes and some other elements we are yet to learn. ;-)

The star "*" represents any number of occurrences of the preceding
character at the specific point in the string. 'Any' really means
'any', even if the character doesn't appear at all. Ooops, what's the
use of that?

Well, let's have a look at the following example:  "Re:\s*\w+" 

Huh, that already looks as cryptic as those regex the experts use .
What does this regex mean?

Search for a 'Re' followed by a colon. Then any number of whitespace
characters may appear - even no spaces at all. What for? In proper
subject lines there should be a space. But imagine we would like to
match any subject string even if someone modified it manually and
deleted the space. We have to tell the regex that there might or might
not be a space. Anyway, both possibilities should be found. This can
be done with the star as quantifier. Well, finally, there has to be at
least one alphanumeric character.

Caution: the meaning of this quantifier is sometimes misinterpreted.
Look at the following task: a regex has to be defined that matches
only lines of a string with only digits in it. One solution I saw was:
"^[0-9]*$"

But this regex matches void lines as well; the star stands for 'no
digit' as well as for 'any digit'. So the regex machine returns TRUE
when no digit is in a line. If you want to make sure that there is at
least one digit in a line you have to use the plus-sign: "^[0-9]+$".

The question mark means that the preceding character may appear once
or not at all at the specific point of the string. A bit like the star
only that the number of occurrence has the maximum '1'. "h..?s"
matches 'hers', 'hips' and 'his' or 'has'. Within 'house' it matches
'hous'; within 'hose' it matches 'hos'.

There is another way to define repetitions: "{x,y}" This is a way to
explicitly define how many repetitions of the preceding characters you
want. In this formula 'x' denotes the minimum number and 'y' the
maximum number necessary for the preceding character. "\d{2,4}" means
that only two to four digits in a row are matched.

If you omit the second number 'y' but leave the comma in the curly
brackets "{x,}", then there is no upper limit and the minimum is
x-times the preceding character. "\w{3,}" matches any string with at
least three word-characters.

If you omit not only the second number but the comma as well "{x}",
then this means the exact number of appearances of the preceding
character. "\d{6}" matches exactly six digits. This quantifier gives
us a new way to write our regex th

Re: Suggestion (RegEx Tester)

2002-07-13 Thread Gerd Ewald

Hello Tack !

  
On Sun, 14 Jul 2002 08:01:03 +0100 GMT your local time,
which was 14.07.2002, 09:01 (GMT+0200) where I live, you wrote:


>   In 'The Bat FAQ/Regular expression tutorial', several references are
>   made to a 'regex tester'. I could find no links to a 'regex tester',
>   but found the one (searching google) that gets integrated with the
>   Bat's help dialog.

>   I think this could be better documented?

Hmmm, if you mean the tutorial, there was a documentation.

,-- [ Tutorial ]
| You have to download a DLL written by Dirk Heiser  
|   
| (http://www.Dirk-Heiser.de/RegExTest/RegExTest_V0.3beta.zip)  
|   
| and copy it into your TB-directory. Then, when you open the TB-help,  
| you will find a tabfolder called RegEx. Or, if you are using the  
| CHM-Version of the help (this probably applies only to the German  
| version), you can use this DLL by creating a link on your desktop  
| which opens the DLL:  
|   
| "%windir%\system32\rundll32.exe regextest.dll, Run"
'--

But I think you mean that this is not documented in TB itself. Well,
the regex tester is a private program and not an official feature of
Ritlabs. Maybe Dirk might find some interest to offer it Ritlabs.

Have a nice weekend

-- 
Best regards,
 Gerd 
===
Tutorial "PGP and TB!" and "How to Use Regular Expressions
in TB!" at www.pro-privacy.de
---
Money may be the husk of many things, but not the kernel. It buys
you food, but not appetite; medicine, but not health; acquaintances,
but not friends; servants, but not loyalty;
days of joy, but not peace or happiness.
 Henrik Ibsen
---
now playing: WDR2 :-)



Current Ver: 1.60q
FAQ: http://faq.thebat.dutaint.com 
Unsubscribe: mailto:[EMAIL PROTECTED]
Archives   : http://tbudl.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
TBTech List: mailto:[EMAIL PROTECTED]
Bug Reports: https://www.ritlabs.com/bt/



Re: Suggestion (RegEx Tester)

2002-07-14 Thread Marcus Ohlström


On Sunday, July 14, 2002, 09:01, Tack wrote:

>   In 'The Bat FAQ/Regular expression tutorial', several references
>   are made to a 'regex tester'. I could find no links to a 'regex
>   tester', but found the one (searching google) that gets integrated
>   with the Bat's help dialog.

Where do you find this regex tester? I've searched the help file with
no luck.


-- 
Regards,
Marcus Ohlström

Using The Bat! v1.60q on Windows 2000 5.0 Build 2195 Service Pack 2
PGP Public Key at http://www.canit.se/~marcus/pgp.asc



Current Ver: 1.60q
FAQ: http://faq.thebat.dutaint.com 
Unsubscribe: mailto:[EMAIL PROTECTED]
Archives   : http://tbudl.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
TBTech List: mailto:[EMAIL PROTECTED]
Bug Reports: https://www.ritlabs.com/bt/



Re: Suggestion (RegEx Tester)

2002-07-14 Thread Marck D Pearlstone

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Tack,

@14 July 2002, 10:01 +0100  Tack [T] in
[EMAIL PROTECTED]">mid:[EMAIL PROTECTED] said to Gerd Ewald:

GE>> But I think you mean that this is not documented in TB itself. Well,
GE>> the regex tester is a private program and not an official feature of
GE>> Ritlabs. Maybe Dirk might find some interest to offer it Ritlabs.

T> What I meant to say was...

T> The Bat's help menu has a link to the 'Unofficial Faq page' at...
T> http://www.silverstones.com/thebat/TBFAQ.html : which has a link to
T> the 'Regular expression tutorial' at...
T> http://www.silverstones.com/thebat/Regex.html : which makes several
T> references like "Try it in the regex tester.", but does not tell you
T> where to find the regex tester.

Yes it does! That's what Gerd said. Right there on the first page in
section 3.

T> IMHO, I think a link to download 'RegExTest_V0.3beta.zip' should be
T> included in the tutorial. ;-)

It is.

- --
Cheers -- .\\arck D. Pearlstone -- List moderator
SB! v1.61 on Windows 2000 5.0.2195 Service Pack 2
'
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.1.90-nr1 (Windows 2000)

iD8DBQE9MUP9OeQkq5KdzaARAuaCAJ9hDarlKrkk2zqO0IcPyiMzOWOjVgCgpjQY
RTRlM+E2o1uxpIEgRBeIBww=
=Gcfq
-END PGP SIGNATURE-




Current Ver: 1.60q
FAQ: http://faq.thebat.dutaint.com 
Unsubscribe: mailto:[EMAIL PROTECTED]
Archives   : http://tbudl.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
TBTech List: mailto:[EMAIL PROTECTED]
Bug Reports: https://www.ritlabs.com/bt/



Re: Suggestion (RegEx Tester)

2002-07-14 Thread Marck D Pearlstone

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Marcus,

@14 July 2002, 11:07 +0200 (10:07 UK time)  Marcus Ohlström [MO] in
[EMAIL PROTECTED]">mid:[EMAIL PROTECTED] said:

>>   In 'The Bat FAQ/Regular expression tutorial', several references
>>   are made to a 'regex tester'. I could find no links to a 'regex
>>   tester', but found the one (searching google) that gets integrated
>>   with the Bat's help dialog.

MO> Where do you find this regex tester? I've searched the help file with
MO> no luck.

See http://www.silverstones.com/thebat/regex.html#patterns and you
will be referred to: http://www.Dirk-Heiser.de/RegExTest/RegExTest.zip

BTW - if you guys were in earnest about reading the tutorial you'd
have found the link!

- --
Cheers -- .\\arck D. Pearlstone -- List moderator
SB! v1.61 on Windows 2000 5.0.2195 Service Pack 2
'
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.1.90-nr1 (Windows 2000)

iD8DBQE9MUWhOeQkq5KdzaARAk6zAKCEG1HuifMBkpFcmySwkexjfhM3GwCfWzrA
A+kGmKax8Jj2k0WSnq4RwJ4=
=sjdI
-END PGP SIGNATURE-




Current Ver: 1.60q
FAQ: http://faq.thebat.dutaint.com 
Unsubscribe: mailto:[EMAIL PROTECTED]
Archives   : http://tbudl.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
TBTech List: mailto:[EMAIL PROTECTED]
Bug Reports: https://www.ritlabs.com/bt/



Re: Suggestion (RegEx Tester)

2002-07-14 Thread Marcus Ohlström


On Sunday, July 14, 2002, 11:34, Marck D Pearlstone wrote:

MO>> Where do you find this regex tester? I've searched the help file
MO>> with no luck.

> See http://www.silverstones.com/thebat/regex.html#patterns and you
> will be referred to: http://www.Dirk-Heiser.de/RegExTest/RegExTest.zip

> BTW - if you guys were in earnest about reading the tutorial you'd
> have found the link!

I did find the regex tester when Gerd Ewald first posted the regex
tutorial to this list. What I asked about was Tack's statement:

> I could find no links to a 'regex tester', but found the one
> (searching google) that gets integrated with the Bat's help dialog

I missinterpreted this, I thought Tack had found a regex tester
integrated somewhere in the help file you get if you hit F1. I
couldn't find this myself and therefore asked my question.

I have followed Gerd's regex tutorial carefully (which I'm sure Gerd
could verify), it's not that I'm not - as you state - in earnest about
reading the tutorial.

-- 
Regards,
Marcus Ohlström

Using The Bat! v1.60q on Windows 2000 5.0 Build 2195 Service Pack 2
PGP Public Key at http://www.canit.se/~marcus/pgp.asc



Current Ver: 1.60q
FAQ: http://faq.thebat.dutaint.com 
Unsubscribe: mailto:[EMAIL PROTECTED]
Archives   : http://tbudl.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
TBTech List: mailto:[EMAIL PROTECTED]
Bug Reports: https://www.ritlabs.com/bt/



Re: Suggestion (RegEx Tester)

2002-07-14 Thread Gerd Ewald

Hello Marcus Ohlström !

  
On Sun, 14 Jul 2002 14:10:53 +0200 GMT your local time,
which was 14.07.2002, 14:10 (GMT+0200) where I live, you wrote:


>> I could find no links to a 'regex tester', but found the one
>> (searching google) that gets integrated with the Bat's help dialog

> I missinterpreted this, I thought Tack had found a regex tester
> integrated somewhere in the help file you get if you hit F1. I
> couldn't find this myself and therefore asked my question.

Well, Dirk's regex tester does exactly this as long as you do not use
the HTML-version. If you hit F1 you get an additional tab panel


> I have followed Gerd's regex tutorial carefully (which I'm sure Gerd
> could verify), it's not that I'm not - as you state - in earnest about
> reading the tutorial.

Verified!! :-)))

I finished the last part, but I can't get it copied from my laptop :-(
Keep fingers crossed ;-))


-- 
Best regards,
 Gerd 
===
Tutorial "PGP and TB!" and "How to Use Regular Expressions
in TB!" at www.pro-privacy.de
---
An expert is someone who knows some of the worst mistakes that can be made
in his subject and how to avoid them.
 (Werner Heisenberg)
---
now playing: WDR2 :-)



Current Ver: 1.61
FAQ: http://faq.thebat.dutaint.com 
Unsubscribe: mailto:[EMAIL PROTECTED]
Archives   : http://tbudl.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
TBTech List: mailto:[EMAIL PROTECTED]
Bug Reports: https://www.ritlabs.com/bt/



[regex-tutorial]: Part 5

2002-07-22 Thread Gerd Ewald

Hi Batsmen,

here it is: the last part of the regex tutorial. It took some time but
finally we (Marck and I) made it. Again: many thanks to Marck who made
it possible to publish this tutorial in English.

You will find this part online at
http://www.pro-privacy.de/regex/en/part1.htm
in a few days as well as a PDF-version for download.

Have fun :-))

===Start===
7. How to use Regular Expressions in TB

Finally, we can try to use our new language in TB. First of all we
have to know which tools are available to work with regular
expressions. These tools are TB's macros.

7.1 Macros

Not all of TB's macros support the use of regex. Most of the macros
have nothing to do with regex, but you can use regex on them to
extract or modify the information. And that is one feature of TB that
makes it so powerful.

The first macro we will look at is: %REGEXPTEXT="regex" What does it
do? It searches for the pattern "regex" within the original text of a
mail and returns the matched characters. The syntax is quite
straightforward, look at the following example:

 %REGEXPTEXT="[\d\.]+"
This macro used in a quick template and applied to a mail returns
digits and dots.

Let's have a look at a fairly similar macro: %REGEXPQUOTES="regex"

This macro does exactly the same as the first one except that the
returned text is not plain text but quoted text.

That was nice and easy. But when it comes to the extraction of text
from the header of a mail (kludges) or address book entries we need to
combine some macros:

The first one we will need for that is %SETPATTREGEXP. It is used to
define the search pattern in the way %SETPATTREGEXP="regex". "regex"
is the regular expression you created to match the text.

The second one is %REGEXPMATCH. Again, this is easily defined:
%REGEXPMATCH="string" with "string" being any text. It can be a
template, which means that any generic text can be used, so almost any
TB macro can be used to provide the text here.

The definition of a regex through %SETPATTREGEXP is valid unless it is
overwritten by a second appearance of a %SETPATTREGEXP. This means you
can use the same pattern on several different generic texts in one go.

Before we have a look at another example I have to correct something.
Did I say the syntax is quite easy earlier in this chapter? Well,
that's true as long as one only looks at one macro. But let's see how
this changes when we let the macro parse some text:

We already know the macro %REGEXPQUOTES. This could be written in a
different way. Let's assume that we receive Mails from a feedback
form. Part of the content is "newsletter: yes" or "newsletter: no". We
would like to create an autoresponder that uses exactly this
information in a reply template, for example: "Thank you for filling
out our feedback form. You entered 'newsletter: yes/no'. Are you
sure?" You can create more sophisticated text and a better filter to
use different templates for the reply, but for the moment let's stick
to this example;-).

The macro %QUOTES defines what text is to be used as quoted text in a
reply. The only problem is that we have to tell %QUOTES which text
should be used. After that we can copy it to the reply template, add
our standard text and save it.

Ok, first the regex: "^newsletter:\s*(yes|no)". This has to be defined
by %SETPATTREGEXP="^newsletter:\s*(yes|no)". We already know that
%REGEXPMATCH applies the search pattern on any generic text, so we
need a macro that provides the original text of the mail and that is
%TEXT. Now we have to put it all together and create a template that
uses the macros in the correct order.

The only thing that makes it difficult to use these macros are the
"-characters which are used as delimiters for the definition part. In
%SETPATTREGEXP the search pattern is defined between these and in
%QUOTES the text that will be inserted as quoted is defined. Once you
start to combine the macros you have to tell TB which "-character is
delimiter of which macro: the first macro must know whether the second
"-character is the end of the macro or the beginning of the second
macro. The same applies at the end of the second macro and so on. This
can be achieved by doubling the "-character (escaping) or using
different delimiters.

Simply, this looks like:

%M1="%M2=""Def2""%M3=""Def3""". This is getting a bit confusing and
hard to follow, so we could instead say:

%M1="%M2='Def2'%M3='Def3'". The example above would look like:

%QUOTES="%SETPATTREGEXP='^newsletter:\s*(yes|no)'%REGEXPMATCH='%TEXT'"

This example could be written in a simpler way:
%REGEXPQUOTES="^newsletter:\s*(yes|no)", but this is because we
extracted text out of the original text with %TEXT.

Re: Help with Regex

2002-08-10 Thread Januk Aggarwal

Hello Don,

An archeological dig discovered that on Saturday, August 10, 2002 at
9:57 AM, Don Taylor [DT] typed the following:

DT> But all I get is the newline, and none of the attachment text. How
DT> can I accomplish the substitution?

Use a recursive template and a driver template.  I've included two
such templates below.  Note the recursive template is called
recipient2, this template was originally designed to reformat the
output of %TOLIST, %CCLIST or %BCCLIST, but it also works with
%ATTACHMENTS.

[Driver Template]=
%COMMENT='%-
%-%-%IF:"%ATTACHMENTS"<>"":"%ATTACHMENTS; "'%-
%QINCLUDE='recipient2'%-
%Comment=''
[End  QT]=

[recipient2 Template]=
%REM='
  Recipient List reformating routine.
  recipient2 = recursive engine QT
  
  Written by Januk Aggarwal
  June 2002
'%-
%-
%IF:'%-
%SETPATTREGEXP=$(?i)^(\"?(.*?)\"?\s*(\<.*?\>)?\s*[;,]\s*)?$%-
%REGEXPMATCH=$%COMMENT$'<>'':'%-
%-
%SETPATTREGEXP=$(?i)^(\"?(.*?)\"?\s*(\<.*?\>)?\s*[;,]\s*)?$%-
%REGEXPBLINDMATCH=$%COMMENT$%-
%SUBPATT=$2$
%-
%COMMENT=_%-
%-%-%SETPATTREGEXP=$(?i)^(\"?(.*?)\"?\s*(\<.*?\>)?\s*[;,]\s*)?(.*)$%-
%-%-%REGEXPBLINDMATCH=$%COMMENT$%-
%-%-%SUBPATT=$4$_%-
%-
%QINCLUDE="recipient2"'%-
[  End  QT  ]=

-- 
Thanks for writing,
 Januk Aggarwal

This almost blank page was intentional.



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



Re: Help with Regex

2002-08-10 Thread Sudip Pokhrel

Hi Januk,

On Sat, 10 Aug 2002 18:01:29 -0700 GMT (Aug 11, 06:46 my local time),
you [JA] wrote:

JA> Use a recursive template and a driver template. I've included two
JA> such templates below. Note the recursive template is called
JA> recipient2, this template was originally designed to reformat the
JA> output of %TOLIST, %CCLIST or %BCCLIST, but it also works with
JA> %ATTACHMENTS.

Works as documented but when using the %attachments macro singularly,
it inserts a text '' if there are no attachments present. How
can I modify these templates to achieve the same?

-- 
Cheers,Sudip Pokhrel
Sudip  Kathmandu-NP.
   PGP Key ID: 0xD93F5185
/Attachments/  http://pgpkeys.mit.edu
<>


TB! v1.61 -- XP Pro 5.1 | P4-1.6GHz 256MB
_..
Viewer discretion may be advised, but it's never really expected





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



  1   2   3   >