Hi All,

I'm using the RegExp to parse some IMail Logs so that I can upload it to a
database and manage it to create special reports.

I did everything OK. The 20 logs worked fine, but in one o another, where
normally a process take just 2 minutos to do the Execute, do not stop...
took the regular CPU usage and do not stop for more than 16 hours, when I
stopped it at Task Manager.

The average of log files was about 8MB... but it worked fine with 20MB
too... took, about 0 minutos to execute.

Follow the sample code that I'm using.

Set regEx = New RegExp

REM
=======================================================================
REM Processa Leitura de Mensagens pelo IMAP4 e POP3

REM 07:21 00:02 IMAP4 (00000A34) logon success for zevallos
zevallos.com.br from 200.217.215.158
REM 07:21 00:03 IMAP4 (00000A34) logoff for zevallos R:100, D:100, P:0
REM
REM 07:21 00:03 POP3D (00000E48) logon success for autodestaque
diariodopara.com.br from 10.10.1.31
REM 07:21 00:03 POP3D (00000e48) logoff for autodestaque R:0, D:0, P:0

WScript.Echo "Processando Leitura de Mensagens pelo IMAP4 e POP3"
WScript.Echo

regEx.Pattern = "(.*:.*) (.*:.*) (POP3D|IMAP4) \((.*)\) logon success for
(.*) (.*) from (.*)\n"
regEx.IgnoreCase = True
regEx.Global = True

WScript.Echo "Search: " & Now()

Set Matches = regEx.Execute(strLogFile)

WScript.Echo " - " & Now() & " - Ítens encontrados: " & Matches.Count

Abraços,

Ruben Zevallos Jr. [ruben@zevallos.com]
+55 91 8116-7668
-------------------------------------------
Instant Messengers
Yahoo: Zevallos
AIM: RubenZevallosJr
ICQ: 2402977
MSN: RubenZevallos@hotmail.com
-------------------------------------------
HiperTools® 3.0 Developer > http://www.hipertools.com.br/


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 8/20/2003

Re: BIG problem with RegExp - HELPPPPP by Han

Han
Thu Aug 28 15:19:59 CDT 2003

The greedy pattern(.) without break(?) token and the captured match(()),
both can be culprits of endless loop. First add break, and remove, if
needless, captured matches and use (:?~) instead. I cannot test your example
because I don't know whether the line-breaks shown in my OE are same in your
real target string.

"Ruben Zevallos Jr." <zevallos@zevallos.com.br> wrote in message
news:#RvwZLRbDHA.1384@TK2MSFTNGP10.phx.gbl...
> Hi All,
>
> I'm using the RegExp to parse some IMail Logs so that I can upload it to a
> database and manage it to create special reports.
>
> I did everything OK. The 20 logs worked fine, but in one o another, where
> normally a process take just 2 minutos to do the Execute, do not stop...
> took the regular CPU usage and do not stop for more than 16 hours, when I
> stopped it at Task Manager.
>
> The average of log files was about 8MB... but it worked fine with 20MB
> too... took, about 0 minutos to execute.
>
> Follow the sample code that I'm using.
>
> Set regEx = New RegExp
>
> REM
> =======================================================================
> REM Processa Leitura de Mensagens pelo IMAP4 e POP3
>
> REM 07:21 00:02 IMAP4 (00000A34) logon success for zevallos
> zevallos.com.br from 200.217.215.158
> REM 07:21 00:03 IMAP4 (00000A34) logoff for zevallos R:100, D:100, P:0
> REM
> REM 07:21 00:03 POP3D (00000E48) logon success for autodestaque
> diariodopara.com.br from 10.10.1.31
> REM 07:21 00:03 POP3D (00000e48) logoff for autodestaque R:0, D:0, P:0
>
> WScript.Echo "Processando Leitura de Mensagens pelo IMAP4 e POP3"
> WScript.Echo
>
> regEx.Pattern = "(.*:.*) (.*:.*) (POP3D|IMAP4) \((.*)\) logon success
for
> (.*) (.*) from (.*)\n"
> regEx.IgnoreCase = True
> regEx.Global = True
>
> WScript.Echo "Search: " & Now()
>
> Set Matches = regEx.Execute(strLogFile)
>
> WScript.Echo " - " & Now() & " - ?ens encontrados: " & Matches.Count
>
> Abra?s,
>
> Ruben Zevallos Jr. [ruben@zevallos.com]
> +55 91 8116-7668
> -------------------------------------------
> Instant Messengers
> Yahoo: Zevallos
> AIM: RubenZevallosJr
> ICQ: 2402977
> MSN: RubenZevallos@hotmail.com
> -------------------------------------------
> HiperTools?3.0 Developer > http://www.hipertools.com.br/
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.512 / Virus Database: 309 - Release Date: 8/20/2003
>
>



Re: BIG problem with RegExp - HELPPPPP by Ruben

Ruben
Sat Aug 30 08:06:35 CDT 2003

Hi Han,

I received a help from a another person and this is was the final solution.

The problem was that I'm trying to use the .* insted teh \d+ and \S+ that is
more specific and takes less time to process. Now... all searches too less
than 1 minute to process.

Thank you any way.

REM 07:21 00:02 IMAP4 (00000A34) logon success for zevallos
zevallos.com.br from 200.217.215.158
REM 07:21 00:03 IMAP4 (00000A34) logoff for zevallos R:100, D:100, P:0

regEx.Pattern = "(.*:.*) (.*:.*) (POP3D|IMAP4) \((.*)\) logon success for
(.*) (.*) from (.*)\n" <-- Old

regEx.Pattern = "(\d\d:\d\d) (\d\d:\d\d) (POP3D|IMAP4) \((\w{8})\) logon
success for (\S+) (\S+) from (\S+)" <-- Final and Working

REM 07:21 00:00 SMTP-(000009FC) ldeliver check.com.br mtl-main (1)
juliet@hotmail.com 4719

regEx.Pattern = "(.*:.*) (.*:.*) SMTP-\((.*)\) ldeliver (.*) (.*)-main
\(.*\) (.*) (.*)\n" <-- Old

regEx.Pattern = "(\d\d:\d\d) (\d\d:\d\d) SMTP-\((\w{8})\) ldeliver (\S+)
(\S+)-main \(\S+\) (\S+) (\d+)" <-- Final and Working

REM 07:21 18:57 SMTPD(015801D8) [200.162.4.157] RCPT
TO:<abripi@abripi.org.br>

regEx.Pattern = "(.*:.*) (.*:.*) SMTPD\((.*)\) \[(.*)\] RCPT To:<(.*)>"
<-- Old

regEx.Pattern = "(\d\d:\d\d) (\d\d:\d\d) SMTPD\((\w{8})\) \[(\S+)\] RCPT
To:<(\S+)>" <-- Final and Working


"Han" <hp4444@kornet.net> wrote in message
news:O3BIEHabDHA.656@tk2msftngp13.phx.gbl...
> The greedy pattern(.) without break(?) token and the captured match(()),
> both can be culprits of endless loop. First add break, and remove, if
> needless, captured matches and use (:?~) instead. I cannot test your
example
> because I don't know whether the line-breaks shown in my OE are same in
your
> real target string.
>
> "Ruben Zevallos Jr." <zevallos@zevallos.com.br> wrote in message
> news:#RvwZLRbDHA.1384@TK2MSFTNGP10.phx.gbl...
> > Hi All,
> >
> > I'm using the RegExp to parse some IMail Logs so that I can upload it to
a
> > database and manage it to create special reports.
> >
> > I did everything OK. The 20 logs worked fine, but in one o another,
where
> > normally a process take just 2 minutos to do the Execute, do not stop...
> > took the regular CPU usage and do not stop for more than 16 hours, when
I
> > stopped it at Task Manager.
> >
> > The average of log files was about 8MB... but it worked fine with 20MB
> > too... took, about 0 minutos to execute.
> >
> > Follow the sample code that I'm using.
> >
> > Set regEx = New RegExp
> >
> > REM
> > =======================================================================
> > REM Processa Leitura de Mensagens pelo IMAP4 e POP3
> >
> > REM 07:21 00:02 IMAP4 (00000A34) logon success for zevallos
> > zevallos.com.br from 200.217.215.158
> > REM 07:21 00:03 IMAP4 (00000A34) logoff for zevallos R:100, D:100,
P:0
> > REM
> > REM 07:21 00:03 POP3D (00000E48) logon success for autodestaque
> > diariodopara.com.br from 10.10.1.31
> > REM 07:21 00:03 POP3D (00000e48) logoff for autodestaque R:0, D:0,
P:0
> >
> > WScript.Echo "Processando Leitura de Mensagens pelo IMAP4 e POP3"
> > WScript.Echo
> >
> > regEx.Pattern = "(.*:.*) (.*:.*) (POP3D|IMAP4) \((.*)\) logon success
> for
> > (.*) (.*) from (.*)\n"
> > regEx.IgnoreCase = True
> > regEx.Global = True
> >
> > WScript.Echo "Search: " & Now()
> >
> > Set Matches = regEx.Execute(strLogFile)
> >
> > WScript.Echo " - " & Now() & " - ?ens encontrados: " & Matches.Count
> >
> > Abra?s,
> >
> > Ruben Zevallos Jr. [ruben@zevallos.com]
> > +55 91 8116-7668
> > -------------------------------------------
> > Instant Messengers
> > Yahoo: Zevallos
> > AIM: RubenZevallosJr
> > ICQ: 2402977
> > MSN: RubenZevallos@hotmail.com
> > -------------------------------------------
> > HiperTools?3.0 Developer > http://www.hipertools.com.br/
> >
> >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.512 / Virus Database: 309 - Release Date: 8/20/2003
> >
> >
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.514 / Virus Database: 312 - Release Date: 8/28/2003