|
| |||||||||
| Tags: string, vbscript |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| 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..] |
|
#2
| ||||
| ||||
| Re: Vbscript find replace help
Is this what you are asking for. YOURSTRING= Replace(YOURSTRING, "-", "") |
|
#3
| ||||
| ||||
| 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. |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Vbscript find replace help" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to find replace text in Excel | Chini mao | Windows Software | 3 | 07-01-2012 11:44 AM |
| Find and Replace in JavaScript String | Wilbur | Software Development | 5 | 15-12-2009 02:23 PM |
| Vbscript to find latest file | BoanHed | Software Development | 3 | 23-11-2009 08:38 AM |
| Find / Replace in Excel 2007 | KALANI84 | Windows Software | 3 | 07-10-2009 11:01 PM |
| SQL find and replace query | Seraphim | Software Development | 3 | 26-05-2009 02:40 PM |