How can i read a certain portion of a text file and replace with another line?
Like in the file there is a part :"Attend_10" want to replace it with "Attend_10_[Variable_Value].
How can i Do this using script (C#) in SSIS?
How can i read a certain portion of a text file and replace with another line?
Like in the file there is a part :"Attend_10" want to replace it with "Attend_10_[Variable_Value].
How can i Do this using script (C#) in SSIS?
I'm not sure exactly what your inputs are, or requirements for matching, but you could easily use Linq or a
for
loop to perform this. Below are two simple examples that read an input filesample.txt
and write to an output fileout.csv
.Using Linq:
Using a
for
loop:Input: sample.txt:
Output: out.txt
If your matching requirements are more advanced, you can use RegEx to match certain patterns in each string.