Smart adsorbents with reversible photo-regulated molecular switches for selective adsorption and efficient regeneration.