Am Sun, Mar 01, 2026 at 01:32:28AM +0800, schrieb Dan Jacobson:
> All I know is the short form works fine
> $ apt search ~g

This search works because '~g' is a valid regex (without any special
regex syntax like '?') and lo and behold, it works as documented:

```
$ apt-cache show python-yarl-doc python3-yarl wmpuzzle | grep -e '^Package:' -e 
'~g'
Package: python-yarl-doc
  >>> url = URL('https://www.python.org/~guido?arg=1#frag')
  URL('https://www.python.org/~guido?arg=1#frag')
  '/~guido'
Package: python3-yarl
  >>> url = URL('https://www.python.org/~guido?arg=1#frag')
  URL('https://www.python.org/~guido?arg=1#frag')
  '/~guido'
Package: wmpuzzle
 http://people.debian.org/~godisch/wmpuzzle/.
```

So your search successfully searched for the string '~g' and found
some packages where the description contains that string.

This is not at all the same as what the '~g' pattern would result
in IF it would be interpreted by search. Compare:

```
$ apt search ~g
python-yarl-doc/unstable,unstable,testing,testing 1.22.0-1 all
  documentation for the yarl Python library

python3-yarl/unstable,testing 1.22.0-1+b1 amd64
  yet another URL library for Python

wmpuzzle/unstable,testing 0.5.3-1 amd64
  WindowMaker-Dock-App: 4x4 Puzzle

$ apt list ~g
$
```


Best regards

David Kalnischkies

Attachment: signature.asc
Description: PGP signature

Reply via email to