Hi.
Anybody have an algorithm to identify the version of an installed package?
eg. in most cases a dash followed by a number is the start of
the version eg. "abiword-2.2.8-1"
so looking for "-[0-9]" should give the start of the version "2.2.8-1"
but then some packages are installed as eg. "cdparanoia-alpha9.8-24"
so to above rule will give "24" as the version
or "widelands-b8-1.1.fc3.rf" will give "1.1.fc3.rf" as the version
enhancing the rule to include "-alpha[0-9]" and "-b[0-9]" might (NOT) be
ambigious?
Any help or place to go light a candle?
<edit>
I know it is possible to get the relevant info with the proper switches
to the program eg. rpm -qai or pkginfo -qi etc.
But unfortunatly the input is a file I receive and I have no control
over the contents.
</edit>


