2. The circle with the diameter of the two foci of the ellipse intersects the ellipse at four different points. Connecting these four intersection points and the two foci in sequence forms a regular hexagon. Then the eccentricity of this ellipse is $\qquad$
2. $\sqrt{3}-1$.

Let the equation of the ellipse be $\frac{x^{2}}{a^{2}}+\frac{y^{2}}{b^{2}}=1(a>b>0)$. From the condition, we know that the point $\left(\frac{c}{2}, \frac{\sqrt{3} c}{2}\right)$ lies on the ellipse.
$$
\begin{array}{l}
\text { Then } \frac{c^{2}}{4 a^{2}}+\frac{3 c^{2}}{4 b^{2}}=1 \Rightarrow \frac{e^{2}}{4}+\frac{3 e^{2}}{4-4 e^{2}}=1 \\
\Rightarrow e^{2}=4-2 \sqrt{3} \Rightarrow e=\sqrt{3}-1 .
\end{array}
$$