Re: Regex to clean up subject

2015-09-03 Thread Leonard S. Berkowitz
On Thursday, September 3, 2015, 7:31:37 AM, MFPA (tbudl@thebat.dutaint.com) 
wrote:

> "Regular Expressions" (or simply "RegEx", "regex") a way of setting 
> patterns of characters to search for in strings. There is quite a lot 
> about them in TB!'s help file, most of it impenetrable unless you 
> already know what they are talking about. RegEX are not a TB! 
> invention: they are also used in PERL and in M$ Visual Basic, for 
> example (although there may be differences between the various 
> implementations). Marck Pearlstone's website hosts a RegEX tutorial 
> written by Gerd Ewald, starting at 
> , which includes a link
> to a RegEx tester written by Dirk Heiser. 

Many thanks!

-- 
Leonard S. Berkowitz


Using The Bat! v5.2.2 on Windows 7 6.1 Build 7601 Service Pack 1



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


Re: Regex to clean up subject

2015-09-03 Thread MFPA
Hi


On Thursday 3 September 2015 at 1:44:05 AM, in
, Leonard S. Berkowitz wrote:


> On Wednesday, September 2, 2015, 6:28:01 PM, you
> (tbudl@thebat.dutaint.com) wrote:

>> %SETPATTREGEXP=/^(?:(?:[^:]{0,4}(?:[\[\(]\d+[\]\)])?:)?\s*(\[[^\]]*\]\s)|(?:(?:[^:]{0,4}(?:[\[\(]\d+[\]\)])?:)?\s*(?:\[[^\]]*\]\s*)?)?)%-
>> \s*(?:(?:[^:]{0,4}(?:[\[\(]\d+[\]\)])?:)?\s*(?:\[[^\]]*\]\s*)?)*%-
>> (.*?)%- ([\(\[].+[\)\]])?$/%-
>> %RegExpBlindMatch="%OSubj"%- 
>> %Subject='Re: %SUBPATT="1"%SUBPATT="2"'

> It would be very helpful if someone could explain what
> is going on here.




%SETPATTREGEXP defines a search pattern using Regular Expressions.

%RegExpBlindMatch="%OSubj" means the text you are searching within is 
the original subject header.

%Subject='Re: %SUBPATT="1"%SUBPATT="2"' means you are writing the 
subject header of the reply as "Re: " followed by two sub-strings that 
were extracted from the original subject header.



"Regular Expressions" (or simply "RegEx", "regex") a way of setting 
patterns of characters to search for in strings. There is quite a lot 
about them in TB!'s help file, most of it impenetrable unless you 
already know what they are talking about. RegEX are not a TB! 
invention: they are also used in PERL and in M$ Visual Basic, for 
example (although there may be differences between the various 
implementations). Marck Pearlstone's website hosts a RegEX tutorial 
written by Gerd Ewald, starting at 
, which includes a link 
to a RegEx tester written by Dirk Heiser. 



-- 
Best regards

MFPA  

Is it bad luck to be superstitious?

Using The Bat! v4.0.38 on Windows XP 5.1 Build 2600 Service Pack 3 



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


Re: Regex to clean up subject

2015-09-03 Thread MFPA
Hi


On Monday 31 August 2015 at 3:54:22 PM, in
, Fred wrote:


>> Marck Pearlstone has a library of useful macros at
>> .

> Unfortunately, right now I got "Warning:
> mysql_connect() [function.mysql-connect]: Access denied
> for user 'marck'@'80.229.140.13' (using password: YES)
> in D:\Data\wwwroot\cgi\library.php on line 28 Unable to
> open db: Access denied for user 'marck'@'80.229.140.13'
> (using password: YES)".  


I have emailed Marck, via the contact form on his website, to give him 
the "heads-up" about this.



-- 
Best regards

MFPA  

A nod is as good as a wink to a blind bat!

Using The Bat! v4.0.38 on Windows XP 5.1 Build 2600 Service Pack 3 



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


Re: Regex to clean up subject

2015-09-03 Thread Marck Pearlstone
Dear Mfpa,

@3-Sep-2015, 5:48  +0100  (03-Sep 12:35 here) MFPA [M] in
mid:1069448339.20150903123548@my_localhost said to Fred:  

... 
>> Unfortunately, right now I got "Warning:
>> mysql_connect() [function.mysql-connect]: Access denied
>> for user 'marck'@'80.229.140.13' (using password: YES)
>> in D:\Data\wwwroot\cgi\library.php on line 28 Unable to
>> open db: Access denied for user 'marck'@'80.229.140.13'
>> (using password: YES)".

M> I have emailed Marck, via the contact form on his website, to give him
M> the "heads-up" about this.

Eeek! Looks like my ISP has silently killed my SQL data hosting. I am
trying to track it down. Normal service will be resumed... as soon as
I can get a hold of the data. If they still have it :(

Thanks for the heads up!

-- 
  Cheers -- Marck D Pearlstone -- List moderator and fellow end user
  TB! v7.0.2.1 (BETA) on Windows 10.0.10240

'

pgpcYvB6RVjzR.pgp
Description: PGP signature

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

Re: Regex to clean up subject

2015-09-02 Thread Leonard S. Berkowitz
On Wednesday, September 2, 2015, 6:28:01 PM, you (tbudl@thebat.dutaint.com) 
wrote:

> %SETPATTREGEXP=/^(?:(?:[^:]{0,4}(?:[\[\(]\d+[\]\)])?:)?\s*(\[[^\]]*\]\s)|(?:(?:[^:]{0,4}(?:[\[\(]\d+[\]\)])?:)?\s*(?:\[[^\]]*\]\s*)?)?)%-
> \s*(?:(?:[^:]{0,4}(?:[\[\(]\d+[\]\)])?:)?\s*(?:\[[^\]]*\]\s*)?)*%-
> (.*?)%-
> ([\(\[].+[\)\]])?$/%-
> %RegExpBlindMatch="%OSubj"%-
> %Subject='Re: %SUBPATT="1"%SUBPATT="2"'

It would be very helpful if someone could explain what is going on
here.

Thanks.
-- 
Leonard S. Berkowitz


Using The Bat! v5.2.2 on Windows 7 6.1 Build 7601 Service Pack 1



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


Re: Regex to clean up subject

2015-09-02 Thread Rick Grunwald
Thanks!!
-- 
Rick
> On Monday, August 31, 2015, 5:04:44, Rick Grunwald wrote:

>> Someone  once gave me an excellent regular expression that would clean
>> up the subject of things like [this] and {that}

>> I lost it along with all my mail in a hard drive crash

>> If someone has it, could you kindly repost it?

> Here's the one I use:

> %SETPATTREGEXP=/^(?:(?:[^:]{0,4}(?:[\[\(]\d+[\]\)])?:)?\s*(\[[^\]]*\]\s)|(?:(?:[^:]{0,4}(?:[\[\(]\d+[\]\)])?:)?\s*(?:\[[^\]]*\]\s*)?)?)%-
> \s*(?:(?:[^:]{0,4}(?:[\[\(]\d+[\]\)])?:)?\s*(?:\[[^\]]*\]\s*)?)*%-
> (.*?)%-
> ([\(\[].+[\)\]])?$/%-
> %RegExpBlindMatch="%OSubj"%-
> %Subject='Re: %SUBPATT="1"%SUBPATT="2"'



The Bat !: Version 7.0.2.1 (BETA) (64-bit)
Windows:Windows
 major version number
3



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


Re: Regex to clean up subject

2015-09-02 Thread Jernej Simončič
On Monday, August 31, 2015, 5:04:44, Rick Grunwald wrote:

> Someone  once gave me an excellent regular expression that would clean
> up the subject of things like [this] and {that}

> I lost it along with all my mail in a hard drive crash

> If someone has it, could you kindly repost it?

Here's the one I use:

%SETPATTREGEXP=/^(?:(?:[^:]{0,4}(?:[\[\(]\d+[\]\)])?:)?\s*(\[[^\]]*\]\s)|(?:(?:[^:]{0,4}(?:[\[\(]\d+[\]\)])?:)?\s*(?:\[[^\]]*\]\s*)?)?)%-
\s*(?:(?:[^:]{0,4}(?:[\[\(]\d+[\]\)])?:)?\s*(?:\[[^\]]*\]\s*)?)*%-
(.*?)%-
([\(\[].+[\)\]])?$/%-
%RegExpBlindMatch="%OSubj"%-
%Subject='Re: %SUBPATT="1"%SUBPATT="2"'


-- 
< Jernej Simončič ><><><><>< http://eternallybored.org/ >

Life is what happens to you while you are making other plans.
   -- Knight's Law



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

Re: Regex to clean up subject

2015-09-01 Thread Feli Wilcke
Hello Fred,

On Mon, 31 Aug 2015 10:54:22 -0400GMT Fred wrote:

>> Marck Pearlstone has a library of useful macros at 
>> .

F> Unfortunately, right now I got "Warning: mysql_connect()
F> [function.mysql-connect]: Access denied for user 'marck'@'80.229.140.13'
F> (using password: YES) in D:\Data\wwwroot\cgi\library.php on line 28 Unable
F> to open db: Access denied for user 'marck'@'80.229.140.13' (using password:
F> YES)".

Try this one: http://silverstones.com/thebat/samples.html
In the reply template section you will find the reply-cleaner.

-- 
Regards,
Feli

The Bat! Version 7.0.2.1 (BETA) (64-bit) on Windows 7 6.1 Build 7601 Service 
Pack 1

Error finding PITY.SYS - Now get lost and whine at someone else.



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


Re: Regex to clean up subject

2015-09-01 Thread Fred
> Try this one: http://silverstones.com/thebat/samples.html
> In the reply template section you will find the reply-cleaner.

Thanks, Feli and MFPA for the links. It looks as if I will have some
interesting reading there. :-)

-- 
Fred

Using TheBat V.4.2.44.2 for POP3 mail with Windows 7 Service Pack 1



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


Re: Regex to clean up subject

2015-09-01 Thread Rick Grunwald
Thanks!  I had one removed some of the stuff added to headers by Yahoo
groups etc.
I appreciate the reply and did bookmark that site
-- 
Rick
> Hello Fred,

> On Mon, 31 Aug 2015 10:54:22 -0400GMT Fred wrote:

>>> Marck Pearlstone has a library of useful macros at 
>>> .

F>> Unfortunately, right now I got "Warning: mysql_connect()
F>> [function.mysql-connect]: Access denied for user 'marck'@'80.229.140.13'
F>> (using password: YES) in D:\Data\wwwroot\cgi\library.php on line 28 Unable
F>> to open db: Access denied for user 'marck'@'80.229.140.13' (using password:
F>> YES)".

> Try this one: http://silverstones.com/thebat/samples.html
> In the reply template section you will find the reply-cleaner.


The Bat !: Version 7.0.2.1 (BETA) (64-bit)
Windows:Windows
 major version number
3



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


Re: Regex to clean up subject

2015-08-31 Thread Geoff Lane
Using The Bat! 5.8.8 on Windows Vista Build 6002

On Monday, August 31, 2015, 4:04:44 AM, Rick Grunwald wrote:

> Someone  once gave me an excellent regular expression that would clean
> up the subject of things like [this] and {that}

> I lost it along with all my mail in a hard drive crash

> If someone has it, could you kindly repost it?

Many years ago, Marck Pearlstone sent me the following to clean up
subject lines:

%subject="Re: 
%setpattregexp=""(?i)\A\:?(\s*\[.*\])?(\s*(re|ha|rcpt|fwd|fw)(\[\d*\])?:\s*)*(.*)""%RegExpBlindMatch=""%OSubj""%SubPatt=""5"""Hi
 %OFROMFNAME,

However, for most purposes, the %singlere macro does an excellent job
with significantly less fuss!

HTH,

-- 
Geoff Lane
Cornwall, UK


---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
https://www.avast.com/antivirus



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


Re: Regex to clean up subject

2015-08-31 Thread Fred
> Marck Pearlstone has a library of useful macros at 
> .

Unfortunately, right now I got "Warning: mysql_connect()
[function.mysql-connect]: Access denied for user 'marck'@'80.229.140.13'
(using password: YES) in D:\Data\wwwroot\cgi\library.php on line 28 Unable
to open db: Access denied for user 'marck'@'80.229.140.13' (using password:
YES)".

-- 
Fred

Using TheBat V.4.2.44.2 for POP3 mail with Windows 7 Service Pack 1



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


Re: Regex to clean up subject

2015-08-31 Thread MFPA
Hi


On Monday 31 August 2015 at 8:29:36 AM, in
, Geoff Lane wrote:




> Many years ago, Marck Pearlstone sent me the following
> to clean up subject lines:

> %subject="Re:
> %setpattregexp=""(?i)\A\:?(\s*\[.*\])?(\s*(re|ha|rcpt|fwd|fw)(\[\d*\])?:\s*)*(.*)""%RegExpBlindMatch=""%OSubj""%SubPatt=""5"""Hi
> %OFROMFNAME,



Marck Pearlstone has a library of useful macros at 
.



-- 
Best regards

MFPA  

Virtual workspace, Virtual Office, Virtual Job

Using The Bat! v4.0.38 on Windows XP 5.1 Build 2600 Service Pack 3 



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


Regex to clean up subject

2015-08-30 Thread Rick Grunwald
Someone  once gave me an excellent regular expression that would clean
up the subject of things like [this] and {that}

I lost it along with all my mail in a hard drive crash

If someone has it, could you kindly repost it?

Thanks
-- 
Rick

The Bat !: Version 7.0.2.1 (BETA) (64-bit)
Windows:Windows
 major version number
3



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