Case-insensitive string comparison
Alex Martelli
aleax at aleax.it
Tue Apr 15 19:16:42 EDT 2003
Avner Ben wrote:
> "Alex Martelli" <aleax at aleax.it> wrote in message
> news:jJUma.23762$T34.707989 at news2.tin.it...
>
>> You'll have to measure the performance for yourself, but you may
>> find it quite good -- do, and let us know!
>>
>
> Thank you all for the help. Actually, the problem is a little more
> complicated and involves topological sort of the names to make sure that
> names within names are not processed twice, but never mind. I got some
OK, but consider that the \b feature of re's can also help, if you're
interested in word-boundaries. Also, re's | matches left to right --
I don't think you need a topological sort here, just order your names
longest-first and you should be fine. Just hopefully-helpful hints...
> interesting hints. give me a few days and I'll let you know about the
> performance.
OK!
Alex
More information about the Python-list
mailing list