If your carpet is scratched up and fraying, you may need to get it repaired. In Mesa, this doorway the carpet was damaged all the way down to the carpet backing by a pet that was trying to get to the other side of the door. Most indoor carpet if dug at by a pet will fray, unless it is a non-fraying needle punched carpet which is usually used outdoors. A carpet repair will be much less expensive than replacing the carpet.