> I was going to ask why you think regex is a sledgehammer for this one,
Regex's are more complex because we have to then make sure that none of the testchars have any special meaning as regular expression metacharacters. If one of those test chars, for example, contained things like '-' or '\\', we'd have to know to use re.escape() to be safe about things. Once we know regex's (and have been bitten by forgetting those issues... *grin*), then these factors aren't so large. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor