> >>> 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