mhearse has asked for the wisdom of the Perl Monks concerning the following question:
Can some one help me fix my broken regex?rpm -qa fipscheck-1.2.0-1.el5.x86_64 iptables-ipv6-1.3.5-5.3.el5_4.1.x86_64 libXi-1.0.1-4.el5_4.i386 perl-Carp-Clan-5.3-1.2.1.noarch rpm-build-4.6.1-2.el5.x86_64
my ($name, $version, $release, $arch); if ($line =~ /^(\w-+)-(\d.+)-(\d?)\.(\w+)$/) { $name = $1; $version = $2 $release = $3 $arch = $4; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regex for rpm: name, version, release, arch
by choroba (Cardinal) on Aug 30, 2012 at 17:55 UTC | |
by Anonymous Monk on Aug 31, 2012 at 15:06 UTC | |
|
Re: regex for rpm: name, version, release, arch
by philiprbrenan (Monk) on Aug 30, 2012 at 18:06 UTC | |
by mhearse (Chaplain) on Aug 30, 2012 at 18:14 UTC |