Re: Parsing a semi-strange line of text...
From: Torgeir Bakken (MVP) (Torgeir.Bakken-spam_at_hydro.com)
Date: 02/18/04
- Next message: R Dunn: "Re: Using VBS to scan NT machines for KB828028 (MS04-007)"
- Previous message: Anthony B: "Parsing a semi-strange line of text..."
- In reply to: Anthony B: "Parsing a semi-strange line of text..."
- Next in thread: Anthony B: "Re: Parsing a semi-strange line of text..."
- Reply: Anthony B: "Re: Parsing a semi-strange line of text..."
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 18 Feb 2004 21:39:14 +0100
Anthony B wrote:
> I have a text file... with spaces in strange spots that I need parsed... can I have some help? I've tried parsing at the 'space' but that doesn't work due to white spaces sometimes being 2 characters long... (two spaces) only on some lines ..etc... (Can I trim multiple whitespaces down to a SEMI-COLON??)
Hi
Removing all double spaces in the text in the variable TheLineOfText
is maybe an option, like this:
TheLineOfText = objTextFile.Readline
' remove all double spaces (easier to use Split later on)
Do Until InStr(TheLineOfText, " ") = 0
TheLineOfText = Replace(TheLineOfText, " ", " ")
Loop
-- torgeir Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: http://www.microsoft.com/technet/scriptcenter
- Next message: R Dunn: "Re: Using VBS to scan NT machines for KB828028 (MS04-007)"
- Previous message: Anthony B: "Parsing a semi-strange line of text..."
- In reply to: Anthony B: "Parsing a semi-strange line of text..."
- Next in thread: Anthony B: "Re: Parsing a semi-strange line of text..."
- Reply: Anthony B: "Re: Parsing a semi-strange line of text..."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|