sbergmann@weblog.de wrote:
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
You might try: _.string.split(a,'(')[0] Which should still work even if the string has no "(" (it will return the whole thing then). hth, -- | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------>