On Tue, Sep 23, 2008 at 10:02 PM, Wayne Watson <[EMAIL PROTECTED]> wrote: > How do I match a dot in, for example, abc.txt? I want to match it exactly. > There must be some sort of escape.
Assuming you want to match in a regular expression, use \ as an escape and use raw strings. In [40]: import re In [41]: m=re.search(r'\.', 'abc.de') In [43]: m.start() Out[43]: 3 Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor