function [exampleId, isMainFile] = identifyExample(arg) 
    isMainFile = true; 
    exampleId = arg; 
    match = regexp(arg,'^(\w+)/(\w+)$','tokens','once');
    if isempty(match) 
        examples = matlab.internal.language.introspective.findExamples(arg);
        if ~isempty(examples) 
            exampleId = examples(1).exampleId;
            match = regexp(exampleId,'^(\w+)/(\w+)$','tokens','once');
            isMainFile = false;
        end
    end
    
    if isempty(match) 
        error(exampleUtils.em('InvalidArgument',arg))
    end
end
