For these two reactions, the nucleophile attacks the less substituted carbon as it is less sterically hindered.
For these three reactions, attack occurs on the more substituted carbon. I think the explanation for this is that in the transition state, the carbon undergoing attack has a slight cationic character, and can be somewhat stabilized by hyperconjugation, hence lowering the activation barrier for the reaction.
So my question is this : Among steric hindrance (a) and electronic considerations (b), which is the more dominant factor when deciding which carbon to attack? Is it related to the nucleophile used? Is it related to the nature of the heterocycle? Or is the ring-opening and nucleophilic attack non-concerted in some cases? Is it related to hard soft bases? Thanks for any answers in advance.