Why does apt-cache search find packages that do not match a given regular expression?

I ran the following command in linux bash:

apt-cache search 'hex.*(view|edit)' 

My intention was to find any software packages whose name / description contains the "hex. * (View | edit)" template. But among the results, I got the following:

 kipi-plugins - image manipulation/handling plugins for KIPI aware programs 

How can this be in the list of results? As a result, I did not see any corresponding line. Is this apt-cache search command error? Or am I misunderstanding how regular expression is used by this command?

+4
source share
1 answer

search performs a full text search throughout the text in the package description, not just the name. If you want only names, you can use --names-only

+11
source

Source: https://habr.com/ru/post/1311431/


All Articles