My SIL (The veterinarian) gave me a bunch of stuff after her dog passed away. One of the things is something called (I'm trying hard not to laugh here) "Wee Wee Super Strength Stain and Odor Remover" by a company called Four Paws.
It claims to remove stains and odors permanently--and it does have a money-back guarantee. So you may want to give this stuff a shot before ripping up your carpeting.
I can't tell you whether or not it works well unfortunately. I have wood floors with area rugs because I have 3 cats and a dog and accidents inevitably happen--even with animals that are scrupulous in their bathroom/personal habits.
But ren is right. If you can deal with the look of the wood floor it may be a better option in the long run.
I for one like the look of a wood floor--and refinishing a crummy wood floor can often be cheaper than putting down a good quality carpet.
BTW Amazon has the Wee Wee stuff
HEREAfter looking at the label I may keep it around for pretreating laundry stains as it claims it removes grass, blood, grime, etc.
HTH!