>Another approach is to use the split() function in "re" module.
Ah ha, thar's the disconnect. Thanks for all the pointers, my def is now working. Still don't understand the logic behind this design though. I mean why would any programming language have separate search or find functions, one for regex and and another for non-regex based pattern matching? Aren't sed, awk, grep, and perl the reference implementations of search and replace? They don't have non-regex functions, why does Python? Wouldn't it be a lot simpler to use a flag, like grep's '-f', to change the meaning of a search string to be literal? My other gripe is with the kludgy object-oriented regex functions. Couldn't these be better implemented in-line? Why should I, as a coder, have to 're.compile()' when all the reference languages do this at compile time, from a much more straightforward and easy to read in-line function... Raymon -- http://mail.python.org/mailman/listinfo/python-list