Nucleotides (NT) and nucleosides (NS) are added to infant formula to mimic the content of breast milk, but little is known about their impact on infant gut microbiota. In this study, we tested the effect of NS and of yeast extracts (YE) with different NT content using PolyFermS continuous fermentation models mimicking formula-fed, healthy and enteropathogen-contaminated infant gut microbiota. Microbiota composition, short-chain fatty acid (SCFA) formation and gene expression were determined. NS, and to a larger extend YE modulated microbiota composition and increased metabolic activity in both models. Anaerococcus, Peptoniphilus, Fusobacterium, Lactobacillus/Pediococcus/Leuconostoc and Veillonella were enhanced when YE and/or NS were added. The production of SCFA increased with the level of supplied NT equivalents. Addition of NS and YE reduced colonization of Salmonella compared to control periods. Gene expression analysis confirmed taxonomical changes and indicated functional responses to YE. Transcripts related to NT and sulfur metabolism and iron acquisition increased while biosynthesis of co-factors and vitamins decreased after YE addition. Elevated butyrate formation correlated with increased transcripts encoding key enzymes of the two major butyrate synthesis pathways. Our results uncover a strong dose-dependent modulation of NS and YE on infant gut microbiota composition and metabolic activity.