On 12/12/2008, spir <denis.s...@free.fr> wrote: > I just found a simple, but nice, trick to make regexes less unlegible. > Using substrings to represent sub-patterns. E.g. instead of: [...]
Another option is to use the re.VERBOSE flag. This allows you to put comments in your regular expression and use whitespace for formatting. See this article for an example: http://diveintopython.org/regular_expressions/verbose.html HTH! -- John. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor