Q:

Removing a number of tokens from the input stream

I need a command which removes all following tokens which are digits, comma, spaces or newlines and stops if it encounters something else. I can do it by nesting a lot of \peek_charcode_remove_ignore_spaces:NTF, but is there a more elegant way to map e.g. over a clist?
\documentclass{article}
\usepackage{expl3}
\ExplSyntaxOn
\clist_const:Nn\c_uf_page_clist{1,2,3,4,5,6,7,8,9,0,{,}}
\cs_new:Nn\uf_eatline: {
   \peek_charcode_remove_ignore_spaces:NTF 0 { \uf_eatline: }
    {
     \peek_charcode_remove_ignore_spaces:NTF 1 { \uf_eatline: }
      {
       \peek_charcode_remove_ignore_spaces:NTF 6 { \uf_eatline: }
        {
         \peek_charcode_remove_ignore_spaces:NTF , { \uf_eatline: }
         { 
          %and more nesting ...          
         }
        }      
      } 
    }
}

\cs_set_eq:NN\eatline\uf_eatline:
\ExplSyntaxOff
\newcommand\see[2]{, \emph{see} #1}
\begin{document}

\begin{itemize}
\item Texta\eatline116, 
153
\item Textb\eatline\see{Texta}{162}
\end{itemize}

Wanted output:
\begin{itemize}
\item Texta

\item Textb\see{Texta}{162}
\end{itemize}

\end{document}

A:

If you don't expect \eatline to be called inside a group ending with } and you want to skip spaces, you can grab the next token(s) as an argument, examine it and decide.
\documentclass{article}
\usepackage{xparse}

\ExplSyntaxOn
\NewDocumentCommand{\eatline}{m}
 {
  \uf_eatline:n { #1 }
 }

\cs_new_protected:Nn \uf_eatline:n
 {
  \regex_match:nnTF { [0-9,] } { #1 }
   {
    \uf_eatline:n
   }
   { #1 }
 }
\ExplSyntaxOff

\newcommand\see[2]{, \emph{see} #1}

\begin{document}

\begin{itemize}
\item Texta\eatline116, 
153
\item Textb\eatline\see{Texta}{162}
\end{itemize}

Wanted output:
\begin{itemize}
\item Texta

\item Textb\see{Texta}{162}
\end{itemize}

\end{document}

If the token is not a digit or a comma, it is reinserted back, otherwise another token is examined.
Something like {abc} would be reinserted without braces, but it doesn't seem a problem in this context.
The problem with } could be treated at the beginning with a single \peek_catcode:NTF check.

A:

If you're not going to have page numbers larger than 2^31-1 then this might work.
The \uf_eatline: command starts a group, then sets the \catcode of ,, , and ^^M to 9, then uses a primitive integer assignment to consume the remaining numbers (expanding tokens in this process) until something that is not a number is found. Finally, the catcodes are put back to normal with \afterassignment\endgroup. This should work even if no numbers follow the \eatline function and in the {Whatever\eatline} case that egreg mentioned.
\documentclass{article}
\usepackage{expl3}

\ExplSyntaxOn

\cs_set_eq:NN \uf_after_assignment:N \tex_afterassignment:D
\int_new:N \l_uf_tmpa_int
\cs_new:Nn \uf_eatline:
  {
    \group_begin:
      \char_set_catcode_ignore:n { `\, }
      \char_set_catcode_ignore:n { `\  }
      \char_set_catcode_ignore:n { `\^^M }
      \tex_endlinechar:D = 32
      \uf_after_assignment:N
    \group_end:
      \l_uf_tmpa_int = 0
  }

\cs_set_eq:NN\eatline\uf_eatline:
\ExplSyntaxOff

\newcommand\see[2]{, \emph{see} #1}
\begin{document}

\begin{itemize}
\item Texta\eatline116, 
153
\item Textb\eatline\see{Texta}{162}
\end{itemize}

Wanted output:
\begin{itemize}
\item Texta

\item Textb\see{Texta}{162}
\end{itemize}

\end{document}

