Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Ezilon Directory   I Sell Pagerank   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 08-13-2006, 11:55 AM   #1 (permalink)
Inactive
 
Join Date: 06-01-06
Posts: 5
iTrader: 0 / 0%
Latest Blog:
None

grobar is liked by many
regexp implementation help (vbscript)

Okay, so ive got a regexp that works perfectly in an online tester. I am having trouble implementing in my existing code.

It takes a variable (xmlhttp.responseText) that holds an external page's source code, and checks it for the existance of a link to a specified domain. It should then show ONLY the HTML for that link, and then break it up in the sub strings.

What it DOES do currently, is return the whole string, EXCEPT the link it should, in effect doing the opposite.

Any help is appreciated. Source code i'm checking against to test is http://www.robarspages.ca/index.asp and looking for the link to billiardsforum.info.

The VB code thus far:

Code:
url = objRSanc("la_blt_link_url") set xmlhttp = server.CreateObject("MSXML2.ServerXMLHTTP") on error resume next xmlhttp.open "GET", url, false xmlhttp.send "" if err.number <> 0 then VerifyUrl=false response.redirect("http://www.google.com/?0000000000000000000000") else set regizzo = New RegExp regizzo.Pattern = "(<[^>]*?a[^>]*?(?:billiardsforum.info)[^>]*>)((?:.*?(?:<[ \r\t]*a[^>]*>?.*?(?:<.*?/.*?a.*?>)?)*)*)(<[^>]*?/[^>]*?a[^>]*?>)" regizzo.Global = True regizzo.IgnoreCase = True dim stipulation stipulation = regizzo.replace(xmlhttp.responseText, "$2") response.write stipulation Set regizzo = Nothing dim updiz Set updiz = Server.CreateObject("ADODB.Connection") updiz.Open strdbee Set objRSupd = Server.CreateObject("ADODB.RecordSet") strsqlu = "UPDATE la_blt SET la_blt_link_anchor='somevar' WHERE la_blt_id =44" objRSupd.Open strSQLu, updiz, adLockOptimistic end if response.write("done.") %>
grobar is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with RegExp Costin Trifan Coding Forum 9 04-23-2007 09:45 PM
Easy Implementation of Blog on Hompage mojacity Blogging Forum 2 04-17-2007 10:56 AM
Questionable AdSense Implementation on a Proxy Matt Baker Contextual Networks 0 02-22-2007 04:53 AM
Implementation of a .movie file Jason Web Design Lobby 2 05-17-2005 07:26 PM
Javascript: Dynmically change match criteria in RegExp?? Once Coding Forum 0 06-03-2004 01:16 PM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 09:43 PM.
© Copyright 2008 V7 Inc