in reply to Re^4: Regex to grab data after the work "branch from"
in thread Regex to grab data after the work "branch from"
looks like its printing the number of times it matched
In scalar context, the return value of the match indicates whether it matched.
Fixing that, plus a number of other things, should leave you with something like
my $update_p4filelog = "...xyz branch from //source/qcom/qct/multimedi +a/qtv/player/audioplayer/rel/1.1/src/file.cpp#1,#8"; my ($path, $ver) = $update_p4filelog =~ /branch from (.*\/.*)#\d+,(#\d ++)$/; my $update_base_branched_p4path = "$path$ver"; print "$update_base_branched_p4path\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Regex to grab data after the work "branch from"
by perl_mystery (Beadle) on Dec 15, 2010 at 00:11 UTC | |
by Anonymous Monk on Dec 15, 2010 at 01:27 UTC | |
by perl_mystery (Beadle) on Dec 15, 2010 at 01:57 UTC | |
by Anonymous Monk on Dec 15, 2010 at 02:05 UTC | |
by Anonymous Monk on Dec 15, 2010 at 02:27 UTC | |
by Anonyrnous Monk (Hermit) on Dec 15, 2010 at 03:03 UTC | |
by perl_mystery (Beadle) on Dec 15, 2010 at 03:53 UTC |