Vbscript find replace help
Hello,
Im trying to crack something. I have a result file, that I want to edit. I want to delete the |001 string.
The tricky thing is: I want to delete the |001 from every DATE|LOCATION1|001 line, but not the 001 from the BARCODE1|001
The DATE|LOCATION1|001 middle section (location) changes all the time. So i can't find a unique string to find and replace.. Is this doable with vbscript?
ABC|ABC|***
DATE|LOCATION1|001
BARCODE1|001
ABC|ABC|***
DATE|LOCATION2|001
BARCODE2|001
[ETC..]
Re: Vbscript find replace help
Is this what you are asking for.
YOURSTRING= Replace(YOURSTRING, "-", "")
Re: Vbscript find replace help
Why don't you try something like first accept the string in a variable, then compare it with "DATE|LOCATION" string and if found replace the last part with blank otherwise move ahead for the next string. I hope you get my point.