Since \ExplSyntaxOn
changes catcode of :
it makes command with weird argument break when using the macro outside.
\documentclass{article}
\begin{document}
\ExplSyntaxOn
\cs_set:Npn \my_foo:w #1:#2\q_stop {
(#1)
}
\newcommand{\foo}[1]{
\my_foo:w #1:\q_stop
}
\foo{abc:def} % works
\ExplSyntaxOff
\foo{abc:def} % doesn't work
\end{document}
Is there constant like \c_math_subscript_token
but for colon?