I was trying to lookup the versions of libdb in the debian archives with something like that:
$ aptitude search '~S~ndev$(~nlibdb~(\d~|-~)!~v~rnative)'
which didn't work as expected so I changed the search pattern for 'digit or dash' to a (malformed?) bracket pattern
$ aptitude search '~S~ndev$(~nlibdb[[:digit:]-]!~v~rnative)'
which did the job.
Curious about the engine under the hood I tried backreferencing
$ aptitude search '~n~([[:digit:]]~)\1\>~rnative'
which also worked and led me to the conclusion that it must be GNU ERE.
So I have two questions now:
- Does aptitude use GNU EREs?
- Is there any way to get aptitude to accept PCREs?
I hope someone can clarify this for me.