0
我需要一個正則表達式,它將從以下LaTeX方案返回以下字符串數據(粗體)。從LaTeX字符串獲取數據的正則表達式
最後
&
和\end
\begin{pmatrix}?&?\\?&?\\?&1+{\sqrt[3]{x}}\end{pmatrix}
數據之間的數據
\end
之間\begin{bmatrix}1+{\sqrt[3]{x}}\end{bmatrix}
數據
\\
之間\end
\begin{bmatrix}?\\1+2\end{bmatrix}
鑑於此字符串
\begin{pmatrix}?&?\\?&?\\?&1+{\sqrt[3]{x}}\end{pmatrix}\begin{bmatrix}1+{\sqrt[3]{x}}\end{bmatrix}\begin{bmatrix}?\\1+2\end{bmatrix}
我想匹配這些:
1+{\sqrt[3]{x}}
1+{\sqrt[3]{x}}
1+2
究竟是什麼問題?你想獲得字符串中每個矩陣的最後(最右邊)單元格內容嗎?順便說一句,你爲什麼刪除你嘗試的正則表達式? – Palec