No doubt I should know this regex point but ..

Aahz aahz at pythoncraft.com
Thu Aug 14 11:25:21 EDT 2003


In article <545cb8c2.0308140709.281fb610 at posting.google.com>,
Jim Hefferon <jhefferon at smcvt.edu> wrote:
>
>I am writing a class that walks through a file tree and (among other things)
>filters out which files it considers.  So I want to have 
>  __init__( .. ,filterExpression='..')
>For the default I want to filter nothing.  So I need a Python regular
>expression that never matches.  What is (the best) one?

None

Seriously, make the default None, and test for it before trying a regex.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

This is Python.  We don't care much about theory, except where it intersects 
with useful practice.  --Aahz




More information about the Python-list mailing list