答案1
几乎直接的修改我的一个答案
\documentclass{article}
\usepackage{titlesec}
\usepackage{lipsum}
\titleformat{\section}
{\scshape}
{}
{0pt}
{\betweenrules}
\titlespacing*{\section}
{0pt}
{2ex}
{1ex}
\newcommand{\betweenrules}[1]{%
\leaders\hrule height \dimexpr 0.5ex+0.2pt\relax depth -\dimexpr 0.5ex-0.2pt\relax\hfill
\quad
#1% the title
\quad
\leaders\hrule height \dimexpr 0.5ex+0.2pt\relax depth -\dimexpr 0.5ex-0.2pt\relax\hfill
}
\begin{document}
\lipsum[3]
\section{Areas of Expertise}
\lipsum[1-2]
\end{document}