Newbie question.
From: Piotr Borowski (borowski_at_uhc.com.pl)
Date: 03/30/04
- Next message: Michael Wagner: "Long parameter problem"
- Previous message: Tristan Miller: "Re: Ai Wiki for Tcl"
- Next in thread: Bruce Hartweg: "Re: Newbie question."
- Reply: Bruce Hartweg: "Re: Newbie question."
- Reply: Bryan Schofield: "Re: Newbie question."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 30 Mar 2004 11:25:12 +0200
Hello,
I wanted to write a simple script that would parse data from a to b.
a.
-TypDok-Wersja-PIMW-
5 6 -1
b.
TypDok;Wersja;PIMW;
5;6;-1;
I cut off first characters of each line:
[string trim "-"]
[string trim " "]
And then used split and join functions to get requested list.
set posplicie [split $poobcieciu "-"]
set podolaczeniu [join $posplicie ";"]
Eventually I got empty list elements. And my parsing looks like:
TypDok;Wersja;PIMW;
5;;;;;;6;;;;;;-1;
Is there any way to get rid of that empty elements?
Regards,
Piotr Borowski
- Next message: Michael Wagner: "Long parameter problem"
- Previous message: Tristan Miller: "Re: Ai Wiki for Tcl"
- Next in thread: Bruce Hartweg: "Re: Newbie question."
- Reply: Bruce Hartweg: "Re: Newbie question."
- Reply: Bryan Schofield: "Re: Newbie question."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]