A fluorescent probe for ω-aminoacids behaves as a molecular ruler, changing the yellow fluorescent emission into blue as a function of the distance between the terminal ammonium and the carboxylate groups, permitting the quantitative detection of ω-aminoacids, their metabolites and related drugs, such as pregabalin or gabapentin, from pharmaceutical formulations.