Fix crash if regex didn't match anything