fix IE8 returning empty string on no regex match