Remove the "nil" match groups from regexp searches