On Wed, 07 Feb 2007 13:09:00 -0800, Don Morrison wrote:
> string.find is deprecated as per the official python documentation.
>
> take a look at the "re" module
Regular expressions are way, WAY overkill for a simple find. Just use
the string methods. Instead of this:
import string
string.find("
> Don Morrison wrote:
> > string.find is deprecated as per the official python documentation.
> >
> but the str.find() method isn't.
>
> > take a look at the "re" module
> >
> A possibility.
>
> regards
> Steve
Thank you everyone. :) Johny did say "string.find" in his message, not
"str.find", but
Don Morrison wrote:
> string.find is deprecated as per the official python documentation.
>
but the str.find() method isn't.
> take a look at the "re" module
>
A possibility.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenwe
My apologies, I confused the built-in "str" with the module "string".
I was reading from the section of the 2.4.4 docs called: 4.1.4
Deprecated string functions
On 2/7/07, Robert Kern <[EMAIL PROTECTED]> wrote:
> Don Morrison wrote:
> > lower() is also deprecated :) oh well
>
> The string method .
"Don Morrison" <[EMAIL PROTECTED]> wrote:
> lower() is also deprecated :) oh well
>
> On 7 Feb 2007 21:06:08 GMT, Duncan Booth
> <[EMAIL PROTECTED]> wrote:
>> "Johny" <[EMAIL PROTECTED]> wrote:
>>
>> > Is there a good way how to use string.find function to find a
>> > substring if I need to you
Don Morrison wrote:
> lower() is also deprecated :) oh well
The string method .lower() is not deprecated.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying tru
string.find is deprecated as per the official python documentation.
take a look at the "re" module
On 7 Feb 2007 12:53:36 -0800, Johny <[EMAIL PROTECTED]> wrote:
> Is there a good way how to use string.find function to find a
> substring if I need to you case insensitive substring?
> Thanks for r
Johny wrote:
> Is there a good way how to use string.find function to find a
> substring if I need to you case insensitive substring?
> Thanks for reply
> LL
>
Maybe something like:
x="my string I'm going to SEarCH"
hasword='SEARCH' in x.upper()
location=x.upper().find('SEARCH')
print hasword
Tr
Johny a écrit :
> Is there a good way how to use string.find function to find a
> substring if I need to you case insensitive substring?
"abCdZEd".lower().find("BcD".lower())
--
http://mail.python.org/mailman/listinfo/python-list
lower() is also deprecated :) oh well
On 7 Feb 2007 21:06:08 GMT, Duncan Booth <[EMAIL PROTECTED]> wrote:
> "Johny" <[EMAIL PROTECTED]> wrote:
>
> > Is there a good way how to use string.find function to find a
> > substring if I need to you case insensitive substring?
>
> s.lower().find(substring
"Johny" <[EMAIL PROTECTED]> wrote:
> Is there a good way how to use string.find function to find a
> substring if I need to you case insensitive substring?
s.lower().find(substring.lower())
--
http://mail.python.org/mailman/listinfo/python-list
11 matches
Mail list logo