V
vivek_12315
I m parsing a line like:
line = [feature-tributary/access_db.wxs:35: <File Name="EmptyDB.mdb" Source="$(env.ARCHIVE_DIRECTORY)\access_db\DS Apps\Template\Database\FILE.mdb" KeyPath="yes" DiskId="2" Checksum="yes" Id="a621e7596dfcc45ffaec5fe2bb a84a6f1" />]
Contents are in square brackets.
I just want to extract the file name with is in the value of Source attribute.
i.e. FILE.mdb
I tried doing
1. if ($line =~ m/(.*)Source="(.*)"\sKeyPath(.*)/) {
2. if ($line =~ m/(.*)Source="(.*)\.(.*)"(.*)/o) {
3. if ($line =~ m/(.*)Source="(.*)"(.*)/o) {
but none of them is giving me what is required. Even the $ sign in $env is messing out the output when i print on console.
Can someone help me or give pointers ?
line = [feature-tributary/access_db.wxs:35: <File Name="EmptyDB.mdb" Source="$(env.ARCHIVE_DIRECTORY)\access_db\DS Apps\Template\Database\FILE.mdb" KeyPath="yes" DiskId="2" Checksum="yes" Id="a621e7596dfcc45ffaec5fe2bb a84a6f1" />]
Contents are in square brackets.
I just want to extract the file name with is in the value of Source attribute.
i.e. FILE.mdb
I tried doing
1. if ($line =~ m/(.*)Source="(.*)"\sKeyPath(.*)/) {
2. if ($line =~ m/(.*)Source="(.*)\.(.*)"(.*)/o) {
3. if ($line =~ m/(.*)Source="(.*)"(.*)/o) {
but none of them is giving me what is required. Even the $ sign in $env is messing out the output when i print on console.
Can someone help me or give pointers ?