The following MWE shows a way to stretch left, "inside" and right delimiters. Is the use of \vphantom
the good way to do that?
\documentclass{article}
\usepackage{amsmath}
\NewDocumentCommand\interlike{mm}{
\left[ \vphantom{#2}#1 \right|\left.\vphantom{#1} #2 \right>
}
\begin{document}
$\interlike{\dfrac{X^X}{p_p}}{z}$
$\interlike{z}{\dfrac{X^X}{p_p}}$
\end{document}