In article <4de992d7$0$29996$c3e8da3$54964...@news.astraweb.com>, Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> wrote:
> Of course, if you include both case-sensitive and insensitive tests in > the same calculation, that's a good candidate for a regex... or at least > it would be if regexes supported that :) Of course they support that. r'([A-Z]+) ([a-zA-Z]+) ([a-z]+)' matches a word in upper case followed by a word in either (or mixed) case, followed by a word in lower case (for some narrow definition of "word"). Another nice thing about regexes (as compared to string methods) is that they're both portable and serializable. You can use the same regex in Perl, Python, Ruby, PHP, etc. You can transmit them over a network connection to a cooperating process. You can store them in a database or a config file, or allow users to enter them on the fly. -- http://mail.python.org/mailman/listinfo/python-list