Newbie question on Re module
Andrew McGregor
andrew at indranet.co.nz
Sat Jan 4 16:02:24 EST 2003
Ok, I shouldn't post at 3AM without checking very carefully :-)
Point is, strings have lots of methods that are useful for this sort of
thing, and regexps are both slower and not so clear for many applications.
And to tie this in to the other thread on filename globbing, the OPs
problem can be solved that way too.
Andrew
--On Saturday, January 04, 2003 21:49:46 +0100 EpSyLOn
<sasDOTepsylon at wanadoo.fr> wrote:
> On Sun, 05 Jan 2003 08:00:28 +1300, Andrew McGregor
> <andrew at indranet.co.nz> wrote:
>
>> Ah nuts, that should be str.index
>
> No no no :-)
> it's str.find()
> -- ___
> | | \|/
> sas.epsylon<at>wanadoo.fr | | (o -)
> ______ ______ ~_S_A_S_~ _ | |ooO_(_)_Ooo
> / __ Y \/ ____/ \/ !' |/ \ \
>| ____/ |__> |____ \ ` | |_ O | ^ |
> \_____/| ___/______X_ Y_______|___/__||__|
> ~*~ |__|Récursif: \____/ adj, cf Récursif.
> "Quand le sage montre la lune, l'imbécile regarde le doigt."
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>
More information about the Python-list
mailing list