re.IGNORECASE and re.VERBOSE

Simon Brunning simon.brunning at gmail.com
Mon Jul 18 11:20:17 EDT 2005


On 7/18/05, Jeremy <jlconlin at lanl.gov> wrote:
> I am using regular expressions and I would like to use both
> re.IGNORECASE and re.VERBOSE options.  I want to do something like the
> following (which doesn't work):
> 
> matsearch = r'''^\ {0,4}([mM]\d+) '''
> MatSearch = re.compile(matsearch, re.VERBOSE, re.IGNORECASE)

MatSearch = re.compile(matsearch, re.IGNORECASE + re.VERBOSE)

-- 
Cheers,
Simon B,
simon at brunningonline.net,
http://www.brunningonline.net/simon/blog/



More information about the Python-list mailing list