RE: RegEx to remove \x0D\x0A

2003-10-01 Thread Peter Eisengrein
Title: RE: RegEx to remove \x0D\x0A Are you sure they are CRLF's? And why regex? Why not chomp? Can you give us a bit of actual data? -Original Message- From: Bullock, Howard A. [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 01, 2003 12:14 PM To: '[EMAIL PROTECTED

RE: RegEx to remove \x0D\x0A

2003-10-01 Thread Arms, Mike
Bullock, Howard A. [EMAIL PROTECTED] wrote: > My script slurps in a file > > Local $/; > $data = ; > > and want to remove the CRLF's. but even a simple RegEx match does not > succeed for me. > > These all have failed. > > print "\nYES\n" if $data =~ /\015\012/; > print "\nYES\n" if $data =~ /\

RE: RegEx to remove \x0D\x0A

2003-10-01 Thread Bullock, Howard A.
an use any text file for this test as I am only perplexed by the \x0D\x0A behavior. -Original Message- From: Peter Eisengrein [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 01, 2003 1:53 PM To: Bullock, Howard A.; '[EMAIL PROTECTED]' Subject: RE: RegEx to remove \x0D\

RE: RegEx to remove \x0D\x0A

2003-10-01 Thread Bullock, Howard A.
For #1 and #2 below: The file has data. I have examined it in two different Hex editors and printed it to the display. For #3: my script has 'local $/'. Outlook though it was being helpful. :( I guess a simple question is should this be working? If so, I will continue to work with it. -

RE: RegEx to remove \x0D\x0A

2003-10-01 Thread Bullock, Howard A.
Original Message- From: Arms, Mike [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 01, 2003 2:15 PM To: Bullock, Howard A. Subject: RE: RegEx to remove \x0D\x0A Did you add these two lines after reading in the file? print "len=", length( $data ), "\n"; print "data=&

RE: RegEx to remove \x0D\x0A

2003-10-01 Thread Arms, Mike
t; To: 'Arms, Mike'; '[EMAIL PROTECTED]' > Subject: RE: RegEx to remove \x0D\x0A > > > More testing shows that... > > These two statements fail: > print "\nYES\n" if $data =~ /\x0D/s; > print "\nYES\n" if $data =~ /\x0d/s; > > The

RE: RegEx to remove \x0D\x0A

2003-10-01 Thread Bullock, Howard A.
More testing shows that... These two statements fail: print "\nYES\n" if $data =~ /\x0D/s; print "\nYES\n" if $data =~ /\x0d/s; These two statements succeed: print "\nYES\n" if $data =~ /\x0A/s; print "\nYES\n" if $data =~ /\x0a/s; As I stated before two different HEX editors show od oa sequence

RE: RegEx to remove \x0D\x0A

2003-10-01 Thread Bullock, Howard A.
Thank you for your help. Using binmode was indeed the solution. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs