Except as otherwise provided in regulations prescribed by the Secretary of Defense, a member sentenced by a court-martial to a period of confinement for more than six months may be separated from the member’s armed force at any time after the sentence to confinement has become final under chapter 47 of this title and the member has served in confinement for a period of six months.