I don't think I can do that because of the varieties of ways it can be expressed.
1' is 1 foot.
but
21' is 21 feet.
3' is 3 feet.
I don't think I can so easily script this without making it look bad in several places. I think it would be preferable to have 21' rather than an accidental 21 foot.