You are not logged in.

#1 2017-06-05 09:19:09

Registered: 2016-06-06
Posts: 171

AUR search: `tool like grep' vs `tool%like%grep'

Arch wiki wrote:

e.g. try searching for tool%like%grep instead of tool like grep (at searching the AUR)

The way I understand the wiki section is that `tool%like%grep' is more powerful. With `tool like grep' I get 3 results. With `tool%like%grep' I get none. What am I missing?

Last edited by regid (2017-06-05 09:21:38)

pantum-p1000-p2000-p3000-m5100-m5200-ppd-driver (AUR): PPDs, drivers, for Pantum P1000, P2000, P3000, M5100, M5200 printers.
powerofforreboot.efi (AUR): Utilities to be used from within a UEFI boot manager or shell.


#2 2017-06-05 09:30:11

Registered: 2012-08-01
Posts: 544

Re: AUR search: `tool like grep' vs `tool%like%grep'

Seems like an outdated entry in Wiki. AUR takes % literally now.

Sometimes I seem a bit harsh — don’t get offended too easily! PGP: 7C848198AE93D3BB


#3 2017-06-05 09:56:59

Inspector Parrot
Registered: 2011-11-29
Posts: 23,731

Re: AUR search: `tool like grep' vs `tool%like%grep'

But the explanation of why it was that way: the wiki says it uses a mySQL LIKE clause in which case "tool like grep" would only match the exact phrase while "tool%like%grep" would match anything with those three words in that order (assuming the query wrapped the user-entered string in another pair of %...%).  In mySQL, the '%' is a flexible-length wildcard.

"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman


Board footer

Powered by FluxBB