Allow empty match replace

The patch fix a problem with empty matched group that encountered in replacebot used in hewiki.
Sometimes we want to match empty groups

eg /RISHMI(T |IM)?/ would give None for 'RISHMI '

Change-Id: I58dd59a884b1be3c67627a5f4af7acc036c98699
Merge "Allow empty match replace"