Standard Error of a linear regression

As defined here, the estimation of the coefficient of correlation is

$$r = \frac{\Sigma (X_i-E[X])(Y_i-E[Y])}{\sqrt { \Sigma (X_i-E[X])^2 \Sigma (Y_i - E[Y])^2}}$$

and the standard error of $r$ is

$$SE_r = \sqrt{\frac{1-r^2}{n-2}}$$

How was $SE_r$ calculated?

• I believe that particular formula is based on regression calculations. – Glen_b Jun 25 '14 at 9:26
• In particular, see here – Glen_b Jun 25 '14 at 9:34