fix wrong way grep_text finding whether match or not

Normally, regexec() returns 0 for success and the non-zero code REG_NOMATCH for failure.
so it should be '!result' instead of 'result != REG_NOMATCH'