Although expl3's regex engine (which is loaded by regexpatch) is an excellent tool (and my job description is to merchandise expl3), in this case it's like using a shotgun to kill a fly :-)
You can achieve the same effect using a macro to define another. A simplistic definition of a \MakeItalic macro would be \def\MakeItalic#1{\edef#1{\noexpand\textit{#1}}}. The \noexpand would make sure that \textit doesn't blow up inside the \edef (you could omit the \noexpand if you used \protected@edef instead). The #1 would be your macro that contains abc, which would expand into abc.
A more robust definition of \MakeItalic would require e-TeX (you're using LaTeX, so that is the default anyway):
\newcommand{\MakeItalic}[1]{%
\edef#1{\noexpand\textit{\unexpanded\expandafter{#1}}}}
The difference from the previous version is that instead of completely expanding #1, we expand it only once with \unexpanded\expandafter{#1}. This makes sure that if your \test macro contains other macros or active characters it won't explode.
A test document:
\documentclass{article}
\newcommand{\MakeItalic}[1]{%
\edef#1{\noexpand\textit{\unexpanded\expandafter{#1}}}}
% Complicated definition of \test
\def\test{abc}
% Add \textit{...}
\MakeItalic\test
\begin{document}
\texttt{\meaning\test} = \test
\end{document}
produces:

\test:\def\test{}. You are probably getting anUndefined control sequenceerror, right? – Phelype Oleinik Sep 01 '19 at 21:55abc", non-italic. – bers Sep 01 '19 at 21:56\textit. You can resort to a brace trick (like in the answer siracusa just posted) or add the pair at once. – Phelype Oleinik Sep 01 '19 at 22:49\testis not initialized to be empty, as well. – bers Sep 02 '19 at 11:57\newcommand\globaladdbraces[1]{\expandafter\gdef\expandafter#1\expandafter{\expandafter{#1}}} ... \def\test{} ... \g@addto@macro\test{abc} ... \globaladdbraces\test ... \show\test ... \expandafter\textit\test? – Ulrich Diez Sep 02 '19 at 11:59\testmust be initialized to empty. I deleted my comment and corrected this. ;-) I suppose your exploration of the limits of the concept of successively composing things via\g@addto@macrois not just a moot thing for the sake of having fun while playing around with (La)TeX but is an aspect of approaching a concrete task/of solving a concrete problem. Perhaps help can be improved when you reveal as many details of that task/problem as possible. ;-) – Ulrich Diez Sep 02 '19 at 12:07\textit....but in the example provided by you the sequence\textitdoes not occur at all. So my question is: Do you wish to successively compose the entire\textit{abc}-command, i.e., the token-sequence\textit,{,a,b,c,}or do you already have a sequence of tokens and the problem is just about passing that sequence as argument to\textit? – Ulrich Diez Sep 02 '19 at 12:32\envbodyinvisible, but patch commands (\subfloat,\labeletc) to store their arguments somewhere, ensuring correct nesting. Some more general info here: https://tex.stackexchange.com/questions/506424. My specific questions revolves around the need to properly account for \subfloat{\label{a}\label{b}\label{c}...} - doesn't make sense, but someone might do it. (Except for thattabularxproblem that I circumvent bytabular*, I do have a solution now.) – bers Sep 02 '19 at 15:09