On Thu, 7 Aug 2003, Levi Ramsey wrote:
On Thu Aug 07 15:34 -0400, David Walser wrote: > Apparently they can now, but they used to be totally illegal, and for good reason. It makes it near impossible to parse the filename.
[EMAIL PROTECTED] ~ $ rpm -qi bind-utils Name : bind-utils Relocations: (not relocateable) has been around just about forever
Parse it from the end...
I was going to suggest that too, but couldn't come up with a regex. Where's yours? ;-).
regex: ^\(.\+\)-\([^-]\+\)-\([^-]\+\)$
pcre: ^(.+)-([^-]+)-([^-]+)$
but life's easier since you can read tags from the rpm header.
L.
--
Luca Berra -- [EMAIL PROTECTED]
Communication Media & Services S.r.l.
/"\
\ / ASCII RIBBON CAMPAIGN
X AGAINST HTML MAIL
/ \