Re: question about extracting value from a string

2005-12-07 Thread nephish
>I agree -- "to each day are sufficient the evils thereof". Many >programmers fall into the temptation to overgeneralize and fail to >follow the AGNI principle ("Ain't Gonna Need It"...;-). thats funny :) -- http://mail.python.org/mailman/listinfo/python-list

Re: question about extracting value from a string

2005-12-07 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: ... > thanks for the help gents, i am going to just go with string functions, > seems like it will be easier both to code now. and later if and when > the format of this stuff may change. I agree -- "to each day are sufficient the evils thereof". Many programmers fal

Re: question about extracting value from a string

2005-12-07 Thread nephish
the second line was not a typo , and thanks for that. these values may vary somewhat over time. So i may have to rewrite this part of the script. a string is fine for right now, because it is just going to be pumped into a database. i can change it later if necessary. thanks for the help gents, i

Re: question about extracting value from a string

2005-12-07 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: > hey there, > > i have looked at the string module and re. > i was looking for advice on what would be the best way to pull a value > out of a small string. > > for example, i have a string > $.+.09 JAR >and all i want out of it is the +.09 > > likewise, i have >

question about extracting value from a string

2005-12-07 Thread nephish
hey there, i have looked at the string module and re. i was looking for advice on what would be the best way to pull a value out of a small string. for example, i have a string $.+.09 JAR and all i want out of it is the +.09 likewise, i have $-.04 TIN kt and all i want is the -.04 what wou