javascript regex validate years in range

I have input field for year & I need a regex for validation it.
I have such code: ^([12]d)?(dd)$.
But I want allow to validate only years in certain range (1990-2010, for example). How can I do it?

Edit. range must be 1950-2050

Try this:

1990 – 2010:

1950 – 2050:

Other examples:

1945 – 2013:

1812 – 3048:

Basically, you need to split your range into effortless “regexable” chunks: