[32644] in Perl-Users-Digest
Perl-Users Digest, Issue: 3920 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Apr 9 18:09:25 2013
Date: Tue, 9 Apr 2013 15:09:03 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 9 Apr 2013 Volume: 11 Number: 3920
Today's topics:
newbie: Problem with $ and \ in strings <vivekchaurasiya@gmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 9 Apr 2013 14:58:01 -0700 (PDT)
From: vivek_12315 <vivekchaurasiya@gmail.com>
Subject: newbie: Problem with $ and \ in strings
Message-Id: <3526b7e5-5ca3-4842-a8bd-6063887d958e@googlegroups.com>
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 ?
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V11 Issue 3920
***************************************