I'm sure this has been done to death, but I can't find much on a search so I thought I'd ask (probably again).
Dd1 is 6yo and still puts loads of things in her mouth. She has been a committed thumb sucker since she was a baby, and also bites her nails. She has also been through phases of chewing her clothes, which I have managed to nip in the bud each time (by telling her that it means she can't choose her clothes the next day).
One of her good friends at school has just managed to stop sucking her thumb, which has spurred her on to try and stop. Unfortunately she has just replaced it with something else - sucking her hair 
She knows and understands that this isn't good for whatever she is putting in her mouth, and her mouth itself, but just can't seem to stop. If anyone has any ideas, I'd love to hear them.