A measure of the nuclear spin transverse relaxation time T2, as determined using the nuclear magnetic resonance Carr-Purcell Meiboom-Gill (CPMG) experiment, provides unique information characterizing the microstructure of porous media which are themselves ubiquitous across fields of petrophysics, biophysics, and chemical engineering. However, the CPMG measurement is sensitive to diffusion in large magnetic field gradients. Under such conditions an effective relaxation time T2,eff is observed instead, described by a combination of relaxation and diffusion exponents. The relaxation exponent always varies as nte (where n is the number, and te is the temporal separation, of spin echoes). The diffusion exponent varies as nte (k), where 1 < k ≤ 3, although the exact analytic form is often unknown. Here we present a general approach to separating the influence of relaxation and diffusion by utilizing a composite diffusion exponent. Any T2,eff component with a power of k > 1 is removed to provide a measure of the true T2 relaxation time distribution from CPMG data acquired in the presence of a strong background gradient. We apply the technique to discriminate between the effects of relaxation and diffusion in porous media using catalysts and rocks as examples. The method is generally applicable to any CPMG measurements conducted in the presence of a static magnetic field gradient.