We propose and demonstrate what we believe to be a novel photonic sampling technique using an agile optical frequency comb generator achieving flexible sampling frequencies. Several comb lines are carved into sampling pulses which are then time-dispersed along a single-mode optical fiber as a function of the electronically adjusted comb line spacing and the number of comb lines selected. Successful sampling and demodulation of QAM signals up to a 17 GHz carrier frequency with a sampling rate of up to 50 GSa/s have been demonstrated. A minimum of 1.5% EVM at 3 GHz and a maximum 4.4 bits (ENOB) at 2.1 GHz were also measured.