| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
In my asp program, I am trying to open a web site and get some values/strings from that file. This code opens the web site but I have problem with the regular expressions. URL has the web sites address and has the regEx.Pattern has the regular expression. I have written there the whole line of the string is in. String will be defined with this (.*). But this expression does not work.
Will you please help me? <html> <body> <% 'XMLHTTP Open private Function GETHTTP(adres) Set StrHTTP = Server.CreateObject("Microsoft.XMLHTTP" ) StrHTTP.Open "GET" , adres, false StrHTTP.sEnd GETHTTP = StrHTTP.Responsetext Set StrHTTP = Nothing End Function 'XMLHTTP Close URL = "http://www.diyanet.gov.tr/turkish/vakithes_namazsonuc.asp?sehirler=%DDSTANBUL&R1=G%DCNL%DCK&ulk=T%DCRK%DDYE&buton=Hesapla" bilgicek = GETHTTP(URL) response.write(bilgicek) Dim regEx, Match, Matches, expression Set regEx = New RegExp regEx.Pattern = "<p align="center"><font color="#003366" face="Verdana" size="1"><b>(.*)<\/b><\/font><\/td>" regEx.IgnoreCase = True regEx.Global = True Set Matches = regEx.Execute(bilgicek) Response.Write Matches %> </body> </html> |
![]() |
| Viewing: ASP Free Forums > Programming > Code Bank > regular expressions with asp |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|