I have a regular expression but do not know what does it means: >>> import re >>> re.sub(u'(^| )'0,u'\g<1>null','0fa0a') I expect it to replace the begin of string or empty space will null, but actual does nothing. >>> '0fa0a' What does the group reference refer to ? I haven't defined group 1. Why does it not replace? Continue reading...