-
Regular Expression
hi
all
i m using regular expression for parsing outlook mails
like
From: Cliff Young
To: Support
Sent: Monday, July 04, 2005 5:03 PM
Subject: Re: Wallpaper changer
from the body of mail for multiple threads in a mail.
i want a regular exp for getting continuous selected text from
From: to Subject:
but the problem is regular exp terminates itself as the line ends
it might work with above example but not with the below
when body contains the text like
From:</B>
<A title=corcliff@prodigy.net.mx
href="mailto:corcliff@prodigy.net.mx">Cliff Young</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=support@systweak.com
href="mailto:support@systweak.com">support@systweak.com</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, July 04, 2005 7:56
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Wallpaper changer</DIV>
i just want to use regular expr for continuous multiline selection for
From: ********* Subject:.*
so help me in finding substrings using regular expr
i m using visual basic for experiment
pls tell me where i could find the related articles
thanks a lot in advance
Edit/Delete Message
-
Re: Regular Expression
Why not just Split() the text into lines, and then parse each one?
-
Re: Regular Expression
I am not able to get your requirements.Please explain
-
Re: Regular Expression
This will split a file, and double-space it:
Code:
Option Explicit
Private Sub Form_Load()
Dim x As Integer, st As String
Dim ff As Integer
Dim strBuff As String
Dim str() As String
ff = FreeFile
Open App.Path & "\to do.txt" For Input As #ff
strBuff = Input(LOF(ff), ff)
Close #ff
' ----------------- two ways to skin a cat --------------
MsgBox "Lines = " & Len(strBuff) - Len(Replace(strBuff, vbCrLf, "x")) + 1
' -------------------------------------------------------
str() = Split(strBuff, vbCrLf)
MsgBox "There are " & UBound(str) + 1 & " lines in the file"
For x = 0 To UBound(str)
st = st & str(x) & vbCrLf & vbCrLf
Next x
MsgBox st
End Sub
-
Re: Regular Expression
hi
i m using this kind of regular expression
^[ >]*From:.* \n^[ >]*To:.* \n^[ >]*Subject:.*
which can get desired result when mail is "text mail"
like following
" Hi Sunaina,
I got ASO installed. Appreciate your help.
Kind Regards,
Bruce
>From: "Systweak Support"
>To: "BRUCE COUNTRYMAN"
>Subject: Re: Zip file
>Date: Thu, 2 Jun 2005 17:34:40 +0530
>
>Dear Bruce
>
>Thank you for e-mailing us.
>
>Regarding your query, we are sending you the setup file of registered
>version of Advanced System Optimizer as zipped attachment with this
>e-mail, please note that you need to unzip it before trying to install
>the product.
>This should help.
>
>
"
but not working with mails containing html body format
like on following mail
"
<DIV> </DIV>
<DIV>Hi,</DIV>
<DIV> </DIV>
<DIV>Basically your instructions seem to have fouled everything up. I did as you
suggested and on boot up the wallpaper screen appears on the desktop....I
minimize it but no icon appears on the taskbar. When I open System Optimizer and
then click on Beatify Windows and then on Wallpaper Changer a window opens
saying that Wallpaper Changer is already running but actually it isn't as the
wallpaper never changes. I have attached a window for you to look at which would
indicate that Wallpaper Changer is active.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=support@systweak.com href="mailto:support@systweak.com">Systweak
Support</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=corcliff@prodigy.net.mx
href="mailto:corcliff@prodigy.net.mx">Cliff Young</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, July 05, 2005 6:33
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: Wallpaper changer</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial size=2>Dear Sir/Madam</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thank you for e-mailing us.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><BR>
<P style="MARGIN-LEFT: 10px">
<P><FONT face="arial, helvetica, sans-serif">Regarding your query, please
follow the steps below to add application on startup: </FONT></P>
<P><FONT face="arial, helvetica, sans-serif">1. Select "Startup Cleaner
& Autorun Manager" in left panel option "System Cleaners"
of Advanced System Optimizer.<BR>2. Click to select "All user" in
the left panel.<BR>3. Now, click on "Add" button on the top toolbar.<BR>4.
In dialog box, type the display name for the
application.<BR>5. Locate the executable file of the application in
"Application Path" field.<BR></FONT><FONT
face="arial, helvetica, sans-serif"></FONT></P>
<P><FONT face="arial, helvetica, sans-serif">Finally, click ‘OK’ .</FONT></P>
<P>This should help.</P>
<P style="MARGIN-LEFT: 10px">
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><FONT
face="arial, helvetica, sans-serif">Please do not hesitate to contact us,
should you have further queries.<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><o:p><FONT
face="arial, helvetica, sans-serif"> </FONT></o:p></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><FONT
face="arial, helvetica, sans-serif">Regards</FONT></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p><FONT
face="arial, helvetica, sans-serif"> </FONT></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><FONT
face="arial, helvetica, sans-serif">Sunaina
Hemraj<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 5pt 0in; mso-layout-grid-align: none"><FONT
face="arial, helvetica, sans-serif">Systweak Support
Team<BR>------------------------------------------------------------------------<BR>If
you are not satisfied with the answer, please contact the Chief Development
Officer directly at
cdo@systweak.com<BR>----------------------------------------------------------------<BR>VERY
IMPORTANT: If you are responding to this e-mail, please include all original
message text.</FONT></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p><FONT
face="arial, helvetica, sans-serif"> </FONT></o:p></SPAN></P></FONT></DIV>
"
hope u pls help me