I try to use the tabularray package but I have a error with brackets :
\documentclass{article}
\usepackage{tabularray}
\begin{document}
\begin{tblr}{cells={mode=math}}
1 & 2 \\
[1;2] & [3;4] \\
\end{tblr}
\end{document}
I find a solution without mode math, but it's not very satisfactory :
\documentclass{article}
\usepackage{tabularray}
\begin{document}
\begin{tblr}{}
$1$ & $2$ \\
$[1;2]$ & $[3;4]$ \\
\end{tblr}
\end{document}
The exercise I'm trying to do is here and it works without math mode :
\begin{tblr}{
hlines,vlines,
colspec={ccQ[c,7em]Q[c,7em]},
}
$I$ & $J$ & $I \cap J$ & $I \cup J$ \\
$[3;6]$ & $[4,2;7,1]$ & & \\
$[-4;6]$ & $]2;+\infty[$ & & \\
$]-\infty;1]$ & $]0;+\infty[$ & & \\
$[-2;8]$ & $[1;3]$ & & \\
$[-3;1]$ & $[2;4]$ & &
\end{tblr}