Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 08-07-2009
Member
 
Join Date: Jun 2009
Posts: 2
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..]
Reply With Quote
  #2  
Old 09-07-2009
Member
 
Join Date: Dec 2007
Posts: 1,542
Re: Vbscript find replace help

Is this what you are asking for.
YOURSTRING= Replace(YOURSTRING, "-", "")
Reply With Quote
  #3  
Old 09-07-2009
Member
 
Join Date: May 2008
Posts: 685
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Vbscript find replace help"
Thread Thread Starter Forum Replies Last Post
Find / Replace in Excel 2007 KALANI84 Windows Software 4 21-03-2012 01:32 AM
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
SQL find and replace query Seraphim Software Development 3 26-05-2009 01:40 PM


All times are GMT +5.5. The time now is 04:25 AM.