开发者

Adding string in existing url using VBScript

开发者 https://www.devze.com 2023-01-12 05:22 出处:网络
I am using VBScript for programming I have three vairables and there value is coming through vbscript program.

I am using VBScript for programming

I have three vairables and there value is coming through vbscript program.

publicationPath = "/test/english"

publicationUrl = "/101/english"

publishedPath = "/test/english/about/india/delhi.aspx"

Now if you see the publ开发者_如何学运维icationPath and publishedPath's "/test/english" is same. Now I want that this will be replaced with the publicationUrl value, I mean the final url will be as given below.

pagePublishPath = /101/english/about/india/delhi.aspx"

Please suggest the solution using VBScript

Thanks.


To replace a substring with another substring within a string, use the Replace function:

pagePublishPath = Replace(publishedPath, publicationPath, publicationUrl, 1, 1, vbTextCompare)
0

精彩评论

暂无评论...
验证码 换一张
取 消