Questions about regex

bearophileHUGS at bearophileHUGS at
Sat May 30 06:41:32 EDT 2009

Jared.S., even if a regex doesn't look like a program, it's like a
small program written in a strange language. And you have to test and
comment your programs.
So I suggest you to program in a more tidy way, and add unit tests
(doctests may suffice here) to your regexes, you can also use the
verbose mode and comment them, and you can even indent their sub-parts
as pieces of a program.
You must test all your bricks (in python, not in TextMate) before
using them to build something bigger.


More information about the Python-list mailing list