Thanks for your input for the last question.
I am trying to complete a pattern match (Determining if the string ends in a
forward slash) and can't get it to work at all using:
$scandir =~ /\Z\\/
I have also tried $scandir =~ /$\\/
I can get it to match at the beginning of a string using \A
: Barlow, Neil [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 11, 2002 8:38 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Regualr Expression Again...
Thanks for your input for the last question.
I am trying to complete a pattern match (Determining if the string ends
in a
forward slash) and can't get
PROTECTED]
Subject: RE: Regualr Expression Again...
It almost looks like you're working on a backslash, not a forward slash
- which did you intend? I presume that's all you want to match, you are
ONLY looking for the forward slash on the end of the line?
$scandir=~/\/$/;
or my preference,
$scandir
On 11/09/2002 14:53:05 Barlow, Neil wrote:
I am looking to match \ at the end of the line -
Have tried $scandir=~/\\$/ and am still not getting a match
My input is C:\
Run your script with
perl -Mre=debug yourscript.pl
That will show you what the regular expression engine is doing
(make
PROTECTED]]
Sent: Wednesday, September 11, 2002 8:53 AM
To: 'Gould, Kevin'; [EMAIL PROTECTED]
Subject: RE: Regualr Expression Again...
Appollogies -
I am looking to match \ at the end of the line -
Have tried $scandir=~/\\$/ and am still not getting a match
My input is C:\
Thanks for your help
Barlow, Neil wrote, on Wednesday, September 11, 2002 9:53 AM
: I am looking to match \ at the end of the line -
: Have tried $scandir=~/\\$/ and am still not getting a match
: My input is C:\
perl -e $r=qq(c:\\);print qq(yay\n) if ($r=~/\\$/);
prints yay; same if $r=qq(c:\\\n). (Someone
Isn't the C Prompt usually c:\?
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
Joseph P. Discenza
Sent: Wednesday, September 11, 2002 9:30 AM
To: Barlow, Neil; 'Gould, Kevin';
[EMAIL PROTECTED]
Subject: RE: Regualr Expression Again...
Barlow, Neil
Please ignore my previous post and my most recent lapse in useful
thought...
-Original Message-
From: Joseph P. Discenza [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 11, 2002 9:30 AM
To: Barlow, Neil; 'Gould, Kevin';
[EMAIL PROTECTED]
Subject: RE: Regualr Expression Again