〜んだった to express regret?


I was surprised to see [this Tumblr
post](http://nihongokudasai.tumblr.com/post/136616975121/regretting-not-doing-
somethingforgetting-to-do) describe ～んだった used to mark regret. I can only
assume it's true, but I'm not sure (1) how much of a colloquial
expression/slang is it? (2) what does it come from, grammatically?

I'm familiar with のだ → んだ, but that doesn't seem like the past form (past+んだ)
so is it maybe some kind of abbreviation of んだったらいい？ It doesn't really make
sense though... and I couldn't really find anything anywhere else!




According to 明鏡国語辞典:

> の-だ〘連語〙  
>  ❻《「・・・のだった」の形で》㋑ 悔やむ気持ちを表す。・・・しておけばよかった。「こんなことなら予約しておくのだった。」  
>  ・・・  
>  （表現）話し言葉では「んだ」となることが多い。

* * *

> (1) how much of a colloquial expression/slang is it?

It is a colloquial expression, but I don't think it's slang.

> (2) what does it come from, grammatically?  
>  is it maybe some kind of abbreviation of んだったらいい？

No, it is not the abbreviation of んだったらいい. I think 「～するんだった」 is similar in
meaning and construct to 「～する **べき** だった」. (べき indicates 当然、義務)




According to 明鏡国語辞典:

> の-だ〘連語〙  
>  ❻《「・・・のだった」の形で》㋑ 悔やむ気持ちを表す。・・・しておけばよかった。「こんなことなら予約しておくのだった。」  
>  ・・・  
>  （表現）話し言葉では「んだ」となることが多い。

* * *

> (1) how much of a colloquial expression/slang is it?

It is a colloquial expression, but I don't think it's slang.

> (2) what does it come from, grammatically?  
>  is it maybe some kind of abbreviation of んだったらいい？

No, it is not the abbreviation of んだったらいい. I think 「～するんだった」 is similar in
meaning and construct to 「～する **べき** だった」. (べき indicates 当然、義務)

