Gas Cap Gasket

Just curious how do you replace this?
On my cap the old seal just pulled out over the center and then installed the new one. It's not riveted just tight around the bottom of the center where it indents in.