haven't ever done this...but here's something you might try...
Blot excess stain or liquid.
Soak with lukewarm water one minute and blot with sponge or paper towel.
Repeat until no stain is evident on towel or sponge.
If stain persists, use 1/2 teaspoon liquid hand/dish detergent without lanolin, mixed with 1 pint water and press into stained area with fingers. Blot excess, rinse with clear, lukewarm water to remove detergent and blot dry.
If stain persists, add water again, fold paper towel and place over stain with weight. Check towel every five minutes, or until it is stain free (this procedure may need to be repeated with deep stains).
Brush up pile and allow to dry before walking on carpet.