|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Regular expression problem
I want to search a string of HTML and insert a querystring into any url
where the url is an asp page and is either a local link /folder/page.asp or of a specific domain http://www.somedomain.com/folder/page.asp. It needs to be able to handle plain links and those with querystrings already in there. I could do it with instr functions etc but I thought this might a good time to brush up on regular expressions. Can anyone point me in the right dirction? Regards. Chris wrote on 05 jul 2006 in microsoft.public.inetserver.asp.general:
> I want to search a string of HTML and insert a querystring into any in ASP-Jscript:> url where the url is an asp page and is either a local link > /folder/page.asp or of a specific domain > http://www.somedomain.com/folder/page.asp. myHTML = myHTML.replace(/(\.asp)/ig,"$1?q=Blah") > It needs to be able to You can expand this to any level of sophistication of your "need",> handle plain links and those with querystrings already in there. I > could do it with instr functions etc but I thought this might a good > time to brush up on regular expressions. Can anyone point me in the > right dirction? Regards. but I think you will have to do that yourself or find a programmer. Show where you get stuck. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress) |
|||||||||||||||||||||||