[Python-Dev] string.find() again (was Re: timsort for jython)

jepler@unpythonic.net jepler@unpythonic.net
Tue, 6 Aug 2002 21:57:05 -0500


On Wed, Aug 07, 2002 at 02:27:04PM +1200, Greg Ewing wrote:
> > PS: is pure substring testing such a common idiom?
> > I have not found so many
> > matches for   find\(.*\)\s*>  in the std lib
> 
> For more generality, maybe
> 
>   re in string
> 
> should be made to work too, where re is a regular
> expression object?

Surely the re is the thing that expresses a set of strings ...
    string in re
would be the same as
    re.match(string)

Oh, so
    re in string
would be
    re.search(string)
right?

Clear to me!

> Or would that be starting on a slippery slope
> towards Perl...?-)

Nah.

Jeff