Changing from split to regex gsub in decoded_key