4. In a regular $\square ABC$, $D$ and $E$ are the midpoints of $AB$ and $AC$ respectively. The eccentricity of the hyperbola with foci at $B$ and $C$ and passing through points $D$ and $E$ is $\qquad$
4. $\sqrt{3}+1$.

As shown in Figure 2, with $BC$ as the $x$-axis and the perpendicular bisector of $BC$ as the $y$-axis, establish a coordinate system. Suppose the equation of the hyperbola is $\frac{x^{2}}{a^{2}}-\frac{y^{2}}{b^{2}}=1$, then $C(c, 0), A(0, \sqrt{3} c)$, so $E\left(\frac{c}{2}, \frac{\sqrt{3}}{2} c\right)$. Substituting into the hyperbola equation gives
$\frac{c^{2}}{4 a^{2}}-\frac{3 c^{2}}{4 b^{2}}$ data

which is $\frac{c^{2}}{4 a^{2}}-\frac{3 c^{2}}{4\left(c^{2}-a^{2}\right)}$
$$
=1 \text {, }
$$

which is $\frac{e^{2}}{4}-\frac{3 e^{2}}{4\left(e^{2}-1\right)}=1$.
Solving for $e^{2}$ gives $e^{2}=4 \pm 2 \sqrt{3}$.
$$
\begin{array}{l}
\because e>1, \\
\therefore e=\sqrt{4+2 \sqrt{3}}=
\end{array}
$$
$$
\sqrt{3}+1
$$