Can it really though? I've only ever seen portrayals of healing factors pushing out bullets, never (and I do mean NEVER) seen any portrayal of it doing the same with a knife.
If you think about it, it makes perfect sense. A bullet has a blunt shape, so there's stuff for the regenerating tissue to push on. However, that's only really for head and arm wounds. If it were a body wound, logically you might think the bullet would be pushed out of organs, but the skin would close before it could be pushed out of the body, causing the bullet to be caught inside the abdominal cavity.
In the case of knives though, they have a thin stream-lined construction, and the wider portion of the blade is, well... a blade. So, the healing flesh would just cut itself again by pushing on the blade. Thus, it would not be able to push the blade out. Someone with hands that are not arm-cannons would have to both notice the knife and also pull it out first before the healing could happen properly.
From a pure physics perspective, the flesh would close on the flat of the knife and create so much friction that it becomes impossible for the knife to be pushed out by it's own healing factor. The flesh on the flat of the blade just has too much surface tension so it will hold it there and continuously cut the flesh touching the sharp of the blade. In fact, if someone else came around and tried to pull the blade out, it would likely take several times the amount of strength that was used to push the knife in in the first place. The troll could probably do it if it had arms, but there's a chance that even if the wizard tries to help the troll that the wizard would simply lack the physical strength necessary to remove the offending object.
(This is actually more reason to make it knives. Knives are small enough that pulling them out would be really tough. Swords, on the other hand, would be longer and thus you could get more leverage and a better grip on it. Unless you burry the sword into the beast up to the hilt, it would be rather easy to dislodge by banging it against something. (On the other hand, if you actually DID manage to burry the sword up to the hilt, that thing ain't comin out. About the only way you are getting that thing back is if you kill the troll and then burn the body with fire in order to free up the sword from the flesh that is holding onto it.