On Jul 2, 4:49 am, kj <[email protected]> wrote:
> In <[email protected]> Duncan Booth 
> <[email protected]> writes:
>
> >So, for example:
> >>>> re.compile("c").match("abcdef", 2)
> ><_sre.SRE_Match object at 0x0000000002C09B90>
> >>>> re.compile("^c").search("abcdef", 2)
>
> I find this unconvincing; with re.search alone one could simply
> do:
>
> >>> re.compile("^c").search("abcdef"[2:])

given large enough values of "abcdef", you just allocated several megs
for no good reason, when re.compile("c").match("abcdef", 2) would
process "abcdef" in-place.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to