The vet told me once that when that happens, we shouldn't just pull it out because there are good chances that the string gets caught in there, resulting in serious internal injuries. So we should just be extra careful to not let anything "stringy" lie around. I'll need to hide my dental floss!!
------Scully!!-- it sounds like your cat is having issues with his anal glands! Poor thing. Here's what I found about it:
"Cats (and dogs, too) have little glands near our anuses that secrete scent marking oils. Usually the oils that are created in these glands are expelled without any problems.
But occasionally the glands get plugged up with waxy oils. That creates discomfort, which cats and dogs relieve by "scooting" across the floor.
The oil expressed by the anal glands is considered by humans to be rather offensive in odor. Well, OK, it does kind of stink, but it serves its purpose that way!
If your cat's anal glands get full, you can take him to the vet and the vet (or more likely a vet tech) will express the gunk out of them for you. Some groomers do this service, too.
If this happens regularly, it will save you a lot of money if you learn how to express your cat's anal glands yourself. It's a dirty job, but somebody's gotta do it!"