You are not logged in.

#1 2011-09-06 11:22:54

Camus
Member
Registered: 2011-07-03
Posts: 71

[WAS-MY-MISTAKE] Pacman's regex behavior with plus symbols

I think this is best explained with examples.

There's a 'libxml++' package in official repositories. It doesn't find it if I do this:

pacman -Ss ^libxml\+\+$

Even if I use no caret and/or dollar sign. It finds 'perl-xml-libxml' if I do this:

pacman -Ss libxml\+\+$

Which is really strange. And if I do this:

pacman -Ss gtk-++

It finds all 'gtk-.*' packages.

I know there was a bug saying that devs should make pacman search regex-like and non-regex-like when it comes to pluses, but at the moment the regex way isn't working properly.

Is this a bug, or was support for regex pluses completely dropped? If yes, how would one search for exact match with string that contains pluses?

Last edited by Camus (2011-09-06 12:48:04)

Offline

#2 2011-09-06 11:46:38

kachelaqa
Member
Registered: 2010-09-26
Posts: 216

Re: [WAS-MY-MISTAKE] Pacman's regex behavior with plus symbols

Camus wrote:

I think this is best explained with examples.

There's a 'libxml++' package in official repositories. It doesn't find it if I do this:

pacman -Ss ^libxml\+\+$

your escapes are not working properly. try:

pacman -Ss ^libxml\\+\\+$

or, more generally:

pacman -Ss '^libxml\+\+$'

Offline

#3 2011-09-06 12:45:31

Camus
Member
Registered: 2011-07-03
Posts: 71

Re: [WAS-MY-MISTAKE] Pacman's regex behavior with plus symbols

I don't know why I didn't think of that, it's so obvious now smile

Thanks a lot.

Offline

Board footer

Powered by FluxBB