xbps-query/search.c: simplify regex matching code.