[Slapt-get-user] How does search work?
Per Börjesson
sky at hi.eclipse.co.uk
Sun Jun 25 13:29:36 EDT 2006
Jason Woodward wrote:
>> Also, that's odd. Results like lvm- should not have been returned for
>> "^lvm2*"... That makes me wonder if slapt-get isn't handling the regex
>> correctly...
>
> POSIX regular expression syntax uses '*' to mean 0 or more. So lvm2* would match lvm as well.
Good point
> '-' should be escaped less it being interpreted as a range seperator.
Not according to http://www.regular-expressions.info/characters.html which does NOT include
"-" in the set of "metacharacters". Also, emacs will happily find the string "lvm-" in the
string "lvm-1.0.8-i486-1" using regex "^lvm-", although emacs seems to accept both "-" and
"\-". I guess that makes "POSIX regular expression" different.
>
> In this case, slapt-get applies the expression to the package name, package version, package
> location, and package description. To specify "lvm" exactly, use ^lvm$ where '$' matches the
> line boundary.
Aha, so when you use the term "name" you refer ONLY to "lvm" whereas I refer to "lvm-1.0.8-i486-1".
The FAQ says " name, location, or description" and the slapt-get man page says "names, locations,
and descriptions" but in your reply above you say "package name, package version, package location,
and package description".
THIS IS A VERY IMPORTANT DISTINCTION!
At first I couldn't make sense of ^lvm$ because it will not match "lvm-1.0.8-i486-1" but I can
understand it if I separate it into "lvm" and "1.0.8-i486-1".
I suggest you make this clear in your documentation ;)
Regards
Per
PS. Thanks for all your help :)
More information about the Slapt-get-user
mailing list