function [firstpos,pos]=find_incell(list,name,varargin)
firstpos=[];
pos=[];
if ~iscell(list)
    list=str2cell(list);
end
if prod(size(name,1))~=1;
    disp('y must be scalar')
    return
end
list=list(:);
name=num2str(name);
if iscell(list{1});
    disp('input cannot be a cell of cells');
    return
end
if ~isempty(varargin)
    options=[];
    for jj=1:size(varargin,2)
        options=[options,'''',varargin{jj},'''',','];
    end
    options=options(1:end-1);
    
%     tmp=regexprep(cell2str(varargin,0),'[\[\]]','');
    eval(['uu=regexp(list,name,',options,');']);
else
uu=regexp(list,name);
end
pos=[];
for jj=1:size(uu,1)
    if ~isempty(uu{jj});
        if isempty(pos)
            firstpos=jj;
        end
        pos=[pos;jj];
    end
end
return