Today our son spilled coke on carpet while it spilled on the bedside as well, that is of cloth too. I tried soaking it in with a cloth but it is not working as carpet is still very wealthy.
I would try this:
- soak the respective area of the carpet with water, brush it mildly, to have the coke dissolve in the water;
- remove the diluted coke with some cloth, until you cannot remove more;
- use a vacuum cleaner on the area, to forcefully remove the small quantities remaining;
- repeat until you are satisfied.
You may need to let the carpet get dry before you do it again, to be able to verify the quality of the result.
If there is a cleaning business in the area, have the carpet entirely washed. In my area, car washes are the preferred places for washing carpets, since they have everything already.
I just remembered a situation. I accidentally spilled something on the seats in my car. I applied the procedure described above, and everything turned out nice.
@wordsworth made a very good point in a comment. If you work carefully and the area is mostly dry, you can use standard (dry) vacuum cleaner. However, if the area is quite moist, or if you are not sure, you are better off using a vacuum cleaner designed for wet/dry cleaning, to avoid any damage and any accident.