[Zope] Extracting a part of a string
Farrell, Troy
troy.farrell@wcg.com
Mon, 9 Jul 2001 14:54:19 -0500
See to python tutorial on strings:
http://python.org/doc/current/tut/node5.html#SECTION00512000000000000000=
0
Troy
-----Original Message-----
From: sbergmann@weblog.de [mailto:sbergmann@weblog.de]
Sent: Friday, June 29, 2001 8:57 AM
To: zope@zope.org
Subject: [Zope] Extracting a part of a string
Hello Zopers,=20
I have the following problem:=20
I have a string from a database and want to delete a part from the =
string
and write it back to the database.=20
An example:=20
a =3D ' some words ( another words)'=20
I want to extract now everything without the brackets themselves anth =
the
words in the brackets.=20
That should be the result.=20
a =3D 'some words'=20
How can I do that. With the string-module and "find" I can get the =
index
where the brackets begin. But there is no function to get the string =
from
index 0 to the result index of "find".=20
Is there another way to do this?=20
I=B4m sure that somebody has a solution for me.=20
Steffen