RE: [Zope] Extracting a part of a string
See to python tutorial on strings: http://python.org/doc/current/tut/node5.html#SECTION005120000000000000000 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, I have the following problem: I have a string from a database and want to delete a part from the string and write it back to the database. An example: a = ' some words ( another words)' I want to extract now everything without the brackets themselves anth the words in the brackets. That should be the result. a = 'some words' 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". Is there another way to do this? I´m sure that somebody has a solution for me. Steffen
participants (1)
-
Farrell, Troy