REGEX Help

2016-02-01 Thread Rick Grunwald
> I think I need a regex to pull out the address correctly.
I didn't want to hijack David's thread (actually I did) but I could use some 
help with regex

I need something to clean up my subject line removing some specific items. Some 
people have posted some ones that cleanup RE:  but I need a bit more than that

I am not rich but I could pay a fee for that


-- 
Rick

Windows, , 6,, 3
Version 7.1.12 (Christmas Edition) (64-bit)




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


Regex help

2014-04-29 Thread Stuart
Hello TBUDL,

  I am looking for help with regex. I need to export the text from an e-mail to 
a text file. When I receive the email it looks like this.

asd, sdf, dfg, asd

Unfortunately when I export this is ends up like this.

asd,  sdf,   dfg,  asd

This seems to be the way the program sending the file represents it.

Is there a way using the macro %REGEXPTEXT= to fix this?

TIA

-- 
Best regards,
 Stuart  mailto:skcu...@fastmail.fm



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


Re: Regex help

2014-04-29 Thread jb_lists_tb
Hello Stuart,

On Tuesday, April 29, 2014, 2:50:22 PM, Stuart wrote:

 I am looking for help with regex. I need to export the text from an
 e-mail to a text file. When I receive the email it looks like this.

 asd, sdf, dfg, asd

 Unfortunately when I export this is ends up like this.

 asd,  sdf,   dfg,  asd

 This seems to be the way the program sending the file represents it.

What is in the whitespace between the groups of characters in the
original email? Tabs or spaces? It looks like tabs being expanded so
perhaps the export process is turning tabs into spaces?

How are you exporting the email? Save As?

-- 
   Julian  

   Using The Bat! v6.4.0.2 on Windows 7 6.1 Build 7600 




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


Re: Regex help

2014-04-29 Thread Stuart
Hello jb,

Tuesday, April 29, 2014, 10:25:49 AM, you wrote:

 What is in the whitespace between the groups of characters in the
 original email? Tabs or spaces? It looks like tabs being expanded so
 perhaps the export process is turning tabs into spaces?

The original e-mail shows up with spaces, but if you look at the message source 
it looks like this:  (except there are 11 spaces between each row.

asd, 

 sdf,  

 dfg,  

asd

 How are you exporting the email? Save As?

I am using a filter. It exports the text to a text file on the desktop. I was 
hoping that the regex could be used in the format message part.

-- 
Best regards,
 Stuartmailto:skcu...@fastmail.fm



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


RegEx Help

2007-04-30 Thread Eddie Castelli
Dear all,

I have little problem where I need your help in RegEx/Quick Templates.

The Case:
   I send you a bunch of eMails through the Massmailing feature in the
   AB. As the IP isn't really good some of the send eMails are coming
   back with the reason stated 'Spam', 'refused', 'account doesn't
   exist'. Those coming back is always different. What comes back
   today has not come back last month and may not come back the month
   after.

The solution:
   What I usually do is resending those and most of the time they go
   through. This means I have to look at that eMail that came back,
   copy the eMail and make a search in the send folder. This eMail has
   then to be moved to the Outbox for resending it.

   This is a tedious work as I have around 30-40 such eMail. What I am
   now looking for is the possibility of Automating this procedure.
   The idea is, to highlight or copy the eMail address from the
   returned Mail and start a QT. This one should search for the same
   eMail and move/copy it to the Outbox.

Is this feasible? If yes can anyone give a help for this solution?
Many thanks.


-- 
   liebe Grüsse
www.EddieCastelli.com
Eddie :ec:
  on Tour



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


Re: RegEx Help

2007-04-30 Thread Roelof Otten
Hallo Eddie,

On Mon, 30 Apr 2007 20:40:01 +0100GMT (30-4-2007, 21:40 +0200, where I
live), you wrote:

EC Is this feasible? If yes can anyone give a help for this solution?
EC Many thanks.

You cannot let a QT search for a message somewhere in your message
base.

-- 
Groetjes, Roelof

Hollywood: A trip through a sewer in a glass bottom boat.
http://www.voormijalleen.nl/
The Bat! 3.99.3
Windows XP 5.1 Build 2600 Service Pack 2
2 pop3 accounts
OTFE enabled
P4 3GHz
2 GB RAM


pgpYsg6XbPPBI.pgp
Description: PGP signature

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

Re: RegEx Help

2007-04-30 Thread Eddie Castelli
Dear Roelof,

   -- Montag, 30. April 2007, 18:45:10:


EC Is this feasible? If yes can anyone give a help for this
EC solution? Many thanks.
 You cannot let a QT search for a message somewhere in your message
 base.

Thanks. Any chance in simplifying my task?


-- 
   liebe Grüsse
www.EddieCastelli.com
Eddie :ec:
  on Tour



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


Re: Regex help-hilfe-ajuto needed

2002-08-18 Thread Mandara

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sat, 17 Aug 2002, at 18:25:20 -0700 Januk wrote in
[EMAIL PROTECTED]">mid:[EMAIL PROTECTED] :

JA On Saturday, August 17, 2002 at 21:35 GMT +0200, a stampede was
JA started when Mandara hollered:

Well, that's something... ;-)

JA I know this should really go on TBTECH, but I suppose one or two of
JA these every couple of years on TBUDL isn't so bad.

.

Januk, thanks a lot for the all useful things you wrote. I'll proceed
with it on tbtech, as you and Luc suggested.


Mandara
- --
(__) If you need this key:
('') mailto:[EMAIL PROTECTED]?subject=0x257DFF36
 \/
-BEGIN PGP SIGNATURE-

iD8DBQE9X7lsvgcu6yV9/zYRAhHEAJ9HcfE2Coe2iv9+Rc7zw4K1eB7ObACgt9qM
/GFqvgoH+cnSuEHxVaVXrbA=
=P1cy
-END PGP SIGNATURE-



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



Regex help-hilfe-ajuto needed

2002-08-17 Thread Mandara

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,

  I need just one simple thing: extract a defined *single line* from
  message header and put it in body of reply.

  But no matter how is that simple, I couldn't do that.

  This one ^From: (.*)?$ extracts to much and doesn't stop at the
  end of line (includes entire header from the from line downward).

  This one ^From: (.*?)\.\w+\s* extracts only till dot in address
  domain name (e.g Name username@ispname).

  Is there some elegant formula which would take only one line you
  chose by the first word in the line?

  Be patient with me, please, I am very beginner, and already infected
  with regexp (last night downloaded Gerd's tutorial and forgot to go
  to sleep).

Mandara
- --
(__) If you need this key:
('') mailto:[EMAIL PROTECTED]?subject=0x257DFF36
 \/
-BEGIN PGP SIGNATURE-

iD8DBQE9XqUevgcu6yV9/zYRAgeFAKCP9L4Y9o6CGS3rn1FfDEKkaV9MdgCfbDUo
o6wOSJd2puP4RTdNqrq0+84=
=pkSF
-END PGP SIGNATURE-



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



Re: Regex help-hilfe-ajuto needed

2002-08-17 Thread Peter Palmreuther

Hello Mandara,

On Saturday, August 17, 2002 at 9:35:24 PM you [M] wrote (at least in
part):

M   Is there some elegant formula which would take only one line you
M   chose by the first word in the line?

You nearly got it:

^From:\s*(.*?)\n

You see the difference? The question mark is _inside_ the parentheses
and it searches for the 'newline' explicitly.
This should work quite fine and have everything after 'From:' followed
by any number of white spaces but before 'new line' in sub pattern 1.
-- 
Regards
Peter Palmreuther
(The Bat! v1.61 on Windows 2000 5.0 Build 2195 Service Pack 1)

Borrow money from pessimists--they don't expect it back.



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



Re: Regex help-hilfe-ajuto needed

2002-08-17 Thread Januk Aggarwal

Hello Mandara,

On Saturday, August 17, 2002 at 21:35 GMT +0200, a stampede was
started when Mandara hollered:

I know this should really go on TBTECH, but I suppose one or two of
these every couple of years on TBUDL isn't so bad.

 This one ^From: (.*)?$ extracts to much and doesn't stop at the
 end of line (includes entire header from the from line downward).

As Peter mentioned, you need to put the question mark inside the
brackets.  The reason is that the way you've written it, the
expression says:

 Look for zero or one occurrence of any number of any character
 after a a line starting with From: .

This means you have a redundancy in your repetition operators.  What
you wanted instead is:

 Look for the fewest number of anything on one line that starts
 with From: .

To do that you need to make the any number operator (*) ungreedy.
That is done by adding a question mark *immediately* after the repeat
operator.  So, .* matches the most number of any characters it can,
while .*? matches the fewest number of any characters that it can.

So a corrected version of your expression would be:
^From: (.*?)$

Of course, there are three stylistic things that I would change about
the above.  First, I usually add the ignore case option, just to be
more general. Second, I usually use \s* instead of a literal space to
find whitespace.  This makes sure that I trim *all* spaces if
there is more than one space and it removes other white space
characters like tabs.  Note, these suggestions make the expression
more general, so there can be some undesired behaviour.  In my
experience, the undesired cases for these two suggestions are so rare
that they are well worth the risk.

The third suggestion is to explicitly set the multi-line mode.  This
prevents problems if the default settings ever get changed for
any reason.  It also makes it very clear what behaviour you want from
TB.  After all, the help file suggests that you actually are in the
*opposite* mode by default, so your expression (and Peter's) would
fail if From: wasn't the very first header.  So the final corrected
version that I would use would be: 
(?im-s)^From:\s*(.*?)$

Note I also unset the Dot All option.  I'll let you read the help
file (or the tutorial) to find out why.

 Be patient with me, please, I am very beginner, and already infected
 with regexp (last night downloaded Gerd's tutorial and forgot to go
 to sleep).

I highly recommend that you subscribe to the TBTECH list.  That list
was specially designed for detailed technical discussions.  It has
become more or less specialized towards regexps.

While Gerd's tutorial is very well written, it won't really sink in
until you try analyzing some of the many expressions written on these
lists.  You should try it, post your results on TBTECH and you'll get
some good feedback.

-- 
Thanks for writing,
 Januk Aggarwal

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



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



Re: Regex help-hilfe-ajuto needed

2002-08-17 Thread Mandara

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sat, 17 Aug 2002, at 22:01:02 +0200 Peter wrote:

PP ^From:\s*(.*?)\n

PP You see the difference? The question mark is _inside_ the parentheses
PP and it searches for the 'newline' explicitly.

Yep, I got it. I glued myself with $ as only metachar for the end of
the line. ;-)

PP This should work quite fine and have everything after 'From:' followed
PP by any number of white spaces but before 'new line' in sub pattern 1.

Works like baby. Thanks!

Mandara
- --
(__) If you need this key:
('') mailto:[EMAIL PROTECTED]?subject=0x257DFF36
 \/
-BEGIN PGP SIGNATURE-

iD8DBQE9Xvo9vgcu6yV9/zYRAudYAJ9PVtEWzdTskGnc95hHuYovfy9OKQCePJ24
tbwahriRb9bFsBKZv8R7dT8=
=uV7H
-END PGP SIGNATURE-



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



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





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





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 Help (was: How to filter email messages in which I'm in CC (using kludges?) ??)

2000-04-10 Thread Thomas Fernandez

Hi Nick,

On Mon, 10 Apr 2000 19:36:39 -0700GMT (11/04/2000, 10:36 +0800GMT),
Nick Andriash wrote:

NA I've always thought I had the latest "complete" install, along with the
NA latest Beta. My Help file is dated 24/02/2000, but it doesn't include
NA anything on regular expressions.

That's the one I have, and RegExps are described here. They are kind of
hidden, I didn't find them at first either.

OK, when you open Help Topics, you have two tabs, the left one shows
you the chapter names, the right one lets you search. The search will
lead to nothing if you try searching for "regular expressions".

But there is a chapter for Regular Expressions under the first tab,
just scroll down.

Sorry I don't know what the tabs' names are, they are all written in
Chinese. ;-)

-- 

Cheers,
Thomas.  

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



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