If you need to match an http address in python that may or may not have http, here it is (thanks for nothing #python!):

a = re.compile(r"(http://)?(?P[^/]+)(/)?")

Related posts:

  1. Python magazine customer service
  2. Vimrc for python
  3. Python threads
  4. Cyclomatic complexity of python code
  5. Python and real time graphical analysis