-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: contactkx
Message 3 in Discussion
This code get matches for Image OR Css files i.e searches jpg/.gif/.css
patterns in an Html file; The Regex expression used is:
"<[^>]*\n?.*=(""|')?(.*\."gif")(""|')?.*\n?[^<]*>
Dim matches As MatchCollection
Dim regExPattern As String = "<[^>]*\n?.*=(""|')?(.*\." & sPattern &
")(""|')?.*\n?[^<]*>"
Dim r As Regex = New Regex(regExPattern, RegexOptions.IgnorePatternWhitespace
Or RegexOptions.Multiline Or RegexOptions.IgnoreCase)
matches = r.Matches(html)
Dim _Cnt As Integer = matches.Count '***This line takes 100% CPU Usage</INPUT>
and lots of time to execute
If _Cnt <= 0 Then Return
While i < _Cnt
Try
objtoAdd = msImgCssCollection(i).Groups(2).Value.ToString.Trim
If Not (arr.Contains(objtoAdd)) Then arr.Add(objtoAdd)
i = i + 1
Catch
End Try
End While
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/BDOTNET/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you
received this message by mistake, please click the "Remove" link below. On the
pre-addressed e-mail message that opens, simply click "Send". Your e-mail
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]