A.B.
I keep a solution of 1 part Dawn liquid dish soap to 2 parts peroxide in a squirt bottle. I use it on carpet stains and stains on kids clothes as well. It's gotten out almost every stain I have ever used it on.
Before I knew about the dawn/peroxide mix, I did have an ink pen leak on the floor of my brand new home. I just had the carpet installer come in and cut a little square piece out and patch where the stain was.
Good luck!!