No need to cut any wires. The Wells regulator has the same plug as what you took out. It's a direct replacement just made from solid-state electronics in place of old school mechanical relays. Use one or more of the existing mounting holes. Done.
Yanmar simply went to Hitachi and sourced the same alternator/regulator combo that Hitachi sold to Datsun/Nissan. (Except for Datsun its a 30 amp alternator in the same enclosure; for Yanmar only 5 ? amps). I've run this replacement set since 2003 on the YM240 and it works like new - because it really is the same thing Yanmar specified in the first place.
Pro tip: if you want a 35 amp alternator spec 72 Datsun with Air Conditioning. I think that alternator is fatter and will need a longer belt and adjustment arm, but it used the same regulator. The 30 amp output of the basic model (Datsun without A/C) is plenty unless you have have added massive additional lighting for night snowplowing etc.
I agree with Carey's suggestion to take both the alternator and the regulator to Autozone where they will test them for free, before buying anything.