function grep_model added, works like print model, but accepts regexp