Voltage regulator question

Hey guys, I purchased a new (red) voltage regulator for a 97 Polaris xplorer 400 but realized later that mine is a 98. Will this new red regulator work in place of my old black one? I have a red and a brown wire coming from my circuit board which is my power and ground. Then I have a yellow, a yellow with red stripe and a yellow with brown stripe coming from my stator. The new regulator has a red, brown, yellow, Yellow with red stripe and a black with yellow stripe. Do all the matching wires connect to their respective colors and does the Yellow with brown stripe coming from my ATV connect to the black with yellow on the new regulator? Thanks