in reply to Re^7: Regex to grab data after the work "branch from"
in thread Regex to grab data after the work "branch from"
I thought you were following me closely,I want "#1," to be optional,to be exact "[#\d+,]" in the regex to be optional,if it is present match it but dont print it...,if it is not present ignore it..
what I meant was,the below code prints
//source/qcom/qct/multimedia/qtv/player/audioplayer/rel/1.1/src/file.cpp#1,#8
whereas I only want to print
//source/qcom/qct/multimedia/qtv/player/audioplayer/rel/1.1/src/file.cpp#8
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^9: Regex to grab data after the work "branch from"
by Anonymous Monk on Dec 15, 2010 at 02:05 UTC | |
|
Re^9: Regex to grab data after the work "branch from"
by Anonymous Monk on Dec 15, 2010 at 02:27 UTC | |
|
Re^9: Regex to grab data after the work "branch from"
by Anonyrnous Monk (Hermit) on Dec 15, 2010 at 03:03 UTC | |
by perl_mystery (Beadle) on Dec 15, 2010 at 03:53 UTC |