front marker lens interchangable with rear?

are the front and rear side marker light the same except for the lens? Can you change the lenses? In other words, if I have a front marker light that is bad, and an extra rear, can i just switch the lenses?