Allow empty match replace
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

magul/pywikibot-core,xZise/pywikibot-core,happy5214/pywikibot-core,wikimedia/pywikibot-core,hasteur/g13bot_tools_new,trishnaguha/pywikibot-core,TridevGuha/pywikibot-core,icyflame/batman,jayvdb/pywikibot-core,valhallasw/pywikibot-core,darthbhyrava/pywikibot-local,npdoty/pywikibot,smalyshev/pywikibot-core,wikimedia/pywikibot-core,h4ck3rm1k3/pywikibot-core,jayvdb/pywikibot-core,Darkdadaah/pywikibot-core,Darkdadaah/pywikibot-core,emijrp/pywikibot-core,hasteur/g13bot_tools_new,hasteur/g13bot_tools_new,h4ck3rm1k3/pywikibot-core,VcamX/pywikibot-core,happy5214/pywikibot-core,PersianWikipedia/pywikibot-core,npdoty/pywikibot,magul/pywikibot-core