Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


How to remove hidden characters

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,59241
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> How to remove hidden characters
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 How to remove hidden characters - 4/17/2008 1:02:56 AM   
  shahid09

 

Posts: 58
Score: 0
Joined: 1/22/2007
Status: offline
Hi All,

I am retrieving value from webpage and store as a string. I am getting following error











errorString  = "E12 XYZ NOT COMPATIBLE WITH DATE
                       F08 DATE PAID NOT COMPATIBLE WITH XYZ CODE"

When i capture this error it is a cobination of 2 Error lines and 10 hidden lines. I want to remove "E12" and "F08" from the string. I want to store these values in an array. But when i store it i am getting ubound value = 2 which should be 1. Following is the code which i have written.

My main task here is
1. Capture error message and remove unnecessary character or space before and after string
2. grab first 3 charcters of each line of the string
3. store array with the number of items we grabbed from the string without any space item

Thanks


      
 
 
Post #: 1
 
 RE: How to remove hidden characters - 4/17/2008 1:37:12 AM   
  dm_4ever


Posts: 2641
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
You might consider a regular expression....


      

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to shahid09)
 
 
Post #: 2
 
 RE: How to remove hidden characters - 4/17/2008 2:38:05 AM   
  shahid09

 

Posts: 58
Score: 0
Joined: 1/22/2007
Status: offline
dm_4ever

This code is working fine but last thing which i want to ask  how i store these values in an Array , I have to created fixed length of array of just dynamic array ? If dynamic array how can i give redimension ?

Thanks Alot


      

(in reply to dm_4ever)
 
 
Post #: 3
 
 RE: How to remove hidden characters - 4/17/2008 2:49:16 AM   
  ebgreen


Posts: 4972
Score: 31
Joined: 7/12/2005
Status: offline
An array may not be the best option. Why are you storing them in an array?

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to shahid09)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> How to remove hidden characters Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts