Re: Regualr Expression

2002-09-12 Thread Carl Jolley
On Tue, 10 Sep 2002, Barlow, Neil wrote: Hi all, I am dealing with directories and I read somewhere that it is best to use / rather than \ when dealing with directories. In order to cover my back - I am attempting to parse the string and replace any \ with / using the following: print

RE: Regualr Expression

2002-09-11 Thread csaba . raduly
On 10/09/2002 15:55:14 perl-win32-users-admin wrote: oops, do that and you'll confuse it. swap that for $dir=~s'\'/'g; #not interpolated with single quotes Huh? I've never heard of that. It doesn't work for me either. What version of Perl are you using, and where is this documented? The

RE: Regualr Expression Again...

2002-09-11 Thread Barlow, Neil
\A Can anyone advise on what I am doing wrong? I really really really appreaciate your help with this.. Regards, Neil Barlow -Original Message- From: Stovall, Adrian M. [mailto:[EMAIL PROTECTED]] Sent: 10 September 2002 15:15 To: Barlow, Neil Subject: RE: Regualr Expression You're missing

RE: Regualr Expression Again...

2002-09-11 Thread Gould, Kevin
: 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

RE: Regualr Expression Again...

2002-09-11 Thread Barlow, Neil
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

RE: Regualr Expression Again...

2002-09-11 Thread csaba . raduly
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

RE: Regualr Expression Again...

2002-09-11 Thread Stovall, Adrian M.
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

RE: Regualr Expression Again...

2002-09-11 Thread Joseph P. Discenza
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

RE: Regualr Expression Again...

2002-09-11 Thread Joseph Youngquist
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

RE: Regualr Expression Again...

2002-09-11 Thread Stovall, Adrian M.
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

Regualr Expression

2002-09-10 Thread Barlow, Neil
Hi all, I am dealing with directories and I read somewhere that it is best to use / rather than \ when dealing with directories. In order to cover my back - I am attempting to parse the string and replace any \ with / using the following: print Please enter directory to search: ; #

Regualr Expression

2002-09-10 Thread Stovall, Adrian M.
, September 10, 2002 9:05 AM To: [EMAIL PROTECTED] Subject: Regualr Expression Hi all, I am dealing with directories and I read somewhere that it is best to use / rather than \ when dealing with directories. In order to cover my back - I am attempting to parse the string and replace any \ with / using

Re: Regualr Expression

2002-09-10 Thread Jingmei_Guo
Try this: $dir =~ s/\//\\/g; Barlow, Neil [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 09/10/2002 09:05 AM To:[EMAIL PROTECTED] cc: Subject:Regualr Expression Hi all, I am dealing with directories and I read somewhere that it is best to use / rather

Re: Regualr Expression

2002-09-10 Thread Tim . Moose
The problem here $dir =~ s/\///g; is that the two characters you are dealing with have special meaning. The / is interpreted as a quote delimiter because you are using s///. The strings inside of s/// are interpolated, so the \ is interpreted as an escape character. Try escaping both

Re: Regualr Expression

2002-09-10 Thread Adam Ingerman
Hi all, I am dealing with directories and I read somewhere that it is best to use / rather than \ when dealing with directories. In order to cover my back - I am attempting to parse the string and replace any \ with / using the following: print Please enter directory to search: ;# directory

Re: Regualr Expression

2002-09-10 Thread Adam Ingerman
$dir=~s!\!/!g; #should work better, no ambiguity with slashes oops, do that and you'll confuse it. swap that for $dir=~s'\'/'g; #not interpolated with single quotes ~or~ $die=~s!\\!/!g; that'll teach me _ Send and receive

RE: Regualr Expression

2002-09-10 Thread Thomas_M
oops, do that and you'll confuse it. swap that for $dir=~s'\'/'g; #not interpolated with single quotes Huh? I've never heard of that. It doesn't work for me either. What version of Perl are you using, and where is this documented? -- Mark Thomas[EMAIL PROTECTED]

Re: Regualr Expression

2002-09-10 Thread csaba . raduly
On 10/09/2002 15:37:44 perl-win32-users-admin wrote: $dir=~s!\!/!g; #should work better, no ambiguity with slashes oops, do that and you'll confuse it. swap that for $dir=~s'\'/'g; #not interpolated with single quotes ~or~ $die=~s!\\!/!g; There's also: $die =~ tr!\\!/!; -- Csaba

RE: Regualr Expression

2002-09-10 Thread Adam Ingerman
oops, do that and you'll confuse it. swap that for $dir=~s'\'/'g; #not interpolated with single quotes Huh? I've never heard of that. It doesn't work for me either. What version of Perl are you using, and where is this documented? Hmm, it doesn't work either. meh. there's something

Re: Regualr Expression

2002-09-10 Thread Adam Ingerman
$die=~s!\\!/!g; There's also: $die =~ tr!\\!/!; err, yes... there seems to be something wrong with the auto-correct in my fingers, I'll have to look into them. 8^) _ Chat with friends online, try MSN Messenger:

RE: Regualr Expression

2002-09-10 Thread Barlow, Neil
Cheers, Can the regex expression below then be modified to find out if the number of slashes in the expression is greater than one? -Original Message- From: Stovall, Adrian M. [mailto:[EMAIL PROTECTED]] Sent: 10 September 2002 15:16 To: perl-win32-users Subject: Regualr Expression

RE: Regualr Expression

2002-09-10 Thread Stovall, Adrian M.
. -Original Message- From: Barlow, Neil [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 10, 2002 10:11 AM To: perl-win32-users Subject: RE: Regualr Expression Cheers, Can the regex expression below then be modified to find out if the number of slashes in the expression is greater than one