How to Find and Replace using RegEx in VbScript?

arthro

Regular Member
Joined
Aug 18, 2008
Messages
290
Reaction score
24
Hi, I please help me on using RegEx for VbScript.

I have a text file containing urls like:

Code:
hxxp://www.AffiliateSite.com/productpage.php/AffiliateID/page/-/ProductID

Now I need to replace the "AffiliateID"s with my affiliate ID, I know the basic find and replace in VbScript but how do I do it with RegEx and VbScript if the text file has VARIOUS "AffiliateID"s ?

Please help me, I'm really not that good in RegEx. Thanks in advance.

(Please don't suggest Notepad to find and replace manually as I have many text files that I have to find and replace those urls where each file consist of different/various affiliate ID's. I will loop it into different text files after learning how to replace using RegEx)
 
Try:
Code:
/productpage.php\/(.+)\/page/i
 
Back
Top