Thread
:
Python String Parsing
View Single Post
kevinm2k
2010-05-31 , 18:34
Posts: 272 | Thanked: 52 times | Joined on Jan 2010
#
1
Hi,
Im just starting development in PyQT, and I have quite a basic thing i'm trying to do which I would find quite easy using something like PHP, but i'm struggling with python.
Not sure if im posting in correct place.. but
Basically I have a string like the following:
name:Example;
link:
www.google.com;
datetime:20100209
|
name:Example2;
link:
www.yahoo.co.uk;
datetime:20090808
So each result is seperated by a pipe (|) and key value pairs are seperated by a semi colon, then by a colon.
I want the ability to put these in to some kind of array so I can create a results page with lets say the following:
Result 1
Name: Example
Link:
www.google.com
Datetime: 20100209
Result 2
Name: Example2
Link:
www.yahoo.co.uk
Datetime: 20090808
Could someone help me with this snippet?
Thanks
Quote & Reply
|
kevinm2k
View Public Profile
Send a private message to kevinm2k
Find all posts by kevinm2k