On Tue, Jan 4, 2011 at 09:31, Brett Ritter <swift...@swiftone.org> wrote:
> On Tue, Jan 4, 2011 at 10:37 AM, Richard D. Moores <rdmoo...@gmail.com> wrote:
>> regex = ".*" + search + ".*"
>> p = re.compile(regex, re.I)

>
> Just having "search" as your regex is fine (it will search for the
> pattern _in_ the string, no need to specify the other parts of the
> string),

I see. Thanks.

> but if you're not using any special regex characters you're
> probably better off not using a regex and just using a string
> operation.

Please see my reply to Wayne Werner.

Dick
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to