[Tutor] Why doesn't this regex match???

Kirby Urner urnerk@qwest.net
Fri, 08 Feb 2002 21:53:49 -0800


> >>> p = re.compile(r'\b%s\b' % pattern)
> >>> result = p.search(searchstring, re.IGNORECASE)

One thing here is the re.I or re.IGNORECASE parameter is
compile time, i.e. goes in the compile, not in the search.

Kirby