Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


delimiter

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> delimiter
  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 >>
 delimiter - 8/30/2007 12:10:53 AM   
  hari_vbscript

 

Posts: 15
Score: 0
Joined: 8/10/2007
Status: offline
 

Hi

I am using Split function in VB script.
I have two line of records in the input file. Now i need to store those data in an array. Can anyone tell me the delimiter for new line?

Please go thro the following piece of code:

Dim objFSO,objFile,strLine,blnFound,strContentFound
Dim strContents,intStart,strWord,arrWords,strFinalText,strWord1
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("C:\Scripts\p83700807022603.txt")
strContents = objFile.ReadAll
objFile.Close
arrWords = Split(strContents,"~")

In the Split function, now i need to give the newline character '\n' is not working
 
 
Post #: 1
 
 RE: delimiter - 8/30/2007 12:44:03 AM   
  ebgreen


Posts: 5250
Score: 31
Joined: 7/12/2005
Status: offline
vbCrLf

_____________________________

"... 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 hari_vbscript)
 
 
Post #: 2
 
 RE: delimiter - 8/30/2007 1:56:11 AM   
  CaffeineAddiction

 

Posts: 144
Score: 0
Joined: 2/9/2005
From:
Status: offline
and if that one doesnt work (should ... but hey) you could also use chr(x) where x is the ASCII decimal value of the newline character in that particular file ... it differs between different editors and OSs

_____________________________

Thanks for Answering my Questions ... I hope my Answer to your questions help!

(in reply to ebgreen)
 
 
Post #: 3
 
 
 
  

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 >> delimiter 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