\def\definedelimitedcommand#1#2#3{%
% #1 is the command to define, #2 the delimiter, #3 the replacement text
\toks0={#3}%
\begingroup\edef\x{\endgroup
\def\noexpand#1####1#2####2{\the\toks0}%
}\x
}
\def\wibble{?}
\definedelimitedcommand{\foo}{\wibble}{#1 and #2}
\show\foo