/bundles/itninjaweb/img/Breadcrumb_cap_w.png
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   [ - ] Hide Comments

Comments

Please log in to comment

Answer this question or Comment on this question for clarity

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

Please log in to comment
2
Answered 02/11/2016 by: SMal.tmcc
Red Belt

Please log in to comment
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja

Share