>> Specifically \W signifies a word boundary so >> > Using the non-word pattern '\W' will work except in cases where we're > right at the edge:
Sneaky! I didn't know that... > Slightly more robust is the '\b' boundary assertion pattern: And I never understood why there were two... Which begs the question: under what circumstance would we prefer to use \W instead of \b? I need to dig out my regex book... Alan G. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor