copy regexp from MySQL-python 1.2.4

Fix #7