one thing though each of these words are located on different lines, maybe that's why?
Sim. Você precisa inserir uma opção \n
e usar -M
para pesquisar padrões que ultrapassam limites de linha:
pcregrep -M -q '.*languager.*\n.*Preferences.*' input.file; echo $?
no, they're on few lines apart from each other (i don't have exact count and/or it can be changed, so I need regex for it)
OK. Se sim, tente isto:
pcregrep -M -q '.*languager(\n|.)*Preferences.*' input.file; echo $?