If that is the only train journey you'll do, for sure buy regular tickets. Here is what I've written recently :
"Trains will be easy and cheap, especially when booked in advance. It takes 5 hours (4h30 by car without traffic).
Departures from Nice : 07:50/09:50/13:50/15:50/17:50
- TER Nice - Ventimiglia
- IC Ventimiglia - Milano Centrale
Prices would be (advance tickets) :
- 8,70€ TER Nice - Ventimiglia (sncf-connect.com) valid all day on any train
- 16,90€ IC Ventimiglia - Milano Centrale (trenitalia.com) tied to a specific connection (more expensive otherwise)
OR
- 35,60€ Nice - Milano (sncf-connect.com)"
It's actually for the other way but it's the same in the end. Let me know for questions