/build/static/layout/Breadcrumb_cap_w.png

Scripting Question


In VB Script, I want find a word in text file and replace it with new word.

02/11/2016 2034 views
In VB Script / Java,

1. I want find a word in text file and replace it with new word.
2. here target(finding word) and replacement word should be taken from a excel file.
3. In text file i will be having more number of instances

finding word:             2016-01-18
replacement word:    {{=doDateDeltaFromCurrent("yyyy-MM-dd","-2D");/*2016-01-18*/}}


File:
;:"2016-01-18T04:30:00.000+0000","end":"9999-12-31T00:00:00.000+0000","authorization":{"authCode":"NA"},"secondary":false,"secondaryLiveStreaming":"N","daiEnableMobile":false}],"adult"2016-01-18T04:30:00.000+0000

After Replacement:

;:"{{=doDateDeltaFromCurrent("yyyy-MM-dd","-2D");/*2016-01-18*/}}T04:30:00.000+0000","end":"9999-12-31T00:00:00.000+0000","authorization":{"authCode":"NA"},"secondary":false,"secondaryLiveStreaming":"N","daiEnableMobile":false}],"adult"{{=doDateDeltaFromCurrent("yyyy-MM-dd","-2D");/*2016-01-18*/}}T04:30:00.000+0000




0 Comments   [ + ] Show comments

Comments


All Answers

2
Hello,

maybe you'd use the REPLACE function that's available in VB.
You can look here to start with:
 Kind regards,
Marco - StockTrader
Answered 02/11/2016 by: StockTrader
Red Belt

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ