[python] fix EReg.matchSub (closes #3458)