Fix a problem that could result in de-installation of a port that shares
a prefix of the package name with a new port to be installed. The cause of
this bug was that a pattern was applied without anchor at the end.
Testing revealed that "pkg info -x" ignores an anchor at the end of the
pattern (which might be a bug in pkg), therefore the output of the query
is now additionally filtered with egrep to obtain the desired result.
PR: 225496
Reported by: Martin Birgmeier
Approved by: antoine (implicit)