On Tue, Jan 4, 2011 at 10:41, Richard D. Moores <rdmoo...@gmail.com> wrote: > Please see http://tutoree7.pastebin.com/z9YeSYRw . I'm actually > searching RTF files, not TXT files. > > I want to modify this script to handle searching on a word. So what, > for example, should line 71 be?
OK, I think I've got it. in place of lines 66-75 I now have search = input("first search string: ") search = "\\b" + search + "\\b" if not search: print("Bye") sys.exit() elif search[0] != ' ': p = re.compile(search, re.I) else: p = re.compile(search) Dick _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor