used for saying that what happens next is disappointing or unpleasant
I tore open the box, only to discover that some of the parts were missing. (表達出失望)
only to, except that, only that
只不過 except that = only that: （字典找不到）
He is a good student, except that he sometimes says foul language. (所以他仍然是好學生)
This suit fits me well except that the trousers are too long.
His account is correct, except that some details are omitted.
except (for/that): used to give a reason why something is not possible or true。
要不是: They would all have died except for [=but for] her and her quick thinking. [=it was only because of her that they did not die] (他們沒死)
但是: I want to go, except that I’m tired. (他沒去）
We would like go, except (that) it’s too far. (我們沒去）
除了 except (連接詞)：used to introduce a statement that indicates the only person or thing that is not included in or referred to by a previous statement
這是 except 的正常用法，可以和 but 互換，作為連接詞，前面加什麼後面就加什麼。此外，他還能加個介詞來用。
He does nothing except [=but] complain. (動詞 except 動詞）
She didn’t leave the house all weekend, except to go to church.
Employees were not allowed to leave except in an emergency. [=unless there was an emergency]
Take no orders except from me. [=take orders only from me]
Everyone was invited except for [=but] me.