perl regular expression to give back parts of debian/ubuntu package names
is there any perl regex trick that will correctly recognize and give back
1. package name 2. package upstream 3. package maintainer version
and will work with all ubuntu/debian packages?
for example: sipcalc-1.2.3-1 would be parsed like:
$1 = sipcalc
$2 = 1.2.3
$3 = 1
libapache2-mod_perl-2.3.4-ubuntu5 would be parsed like
$1 = libapache2-mod_perl
$2 = 2.3.4
$3 = ubuntu5
etc.
package names and version numbers are fictious, and are here just give an
idea of what i need. and, this could use split// as well.
thanks.
No comments:
Post a Comment