This should work...

s/\n\r?$/gm

MS line endings are ASCII 10, 13.

Rob

-----Original Message-----
From: IT Workflow - Terry Honeyford
[mailto:[EMAIL PROTECTED]]
Sent: Friday, January 25, 2002 11:27 AM
To: [EMAIL PROTECTED]
Subject: Stripping windows CR/LF characters

I am reading a line at a time of a windows log file
and want to strip off the CR or LF characters at the end of the line
chomp seems to have a weird effect (returning the cursor to the beginning of
the line!)
I am sure there is a regex to do this (similar to s/\cM//g for MAC line
endings)
but I don't know what characters are at the end of
lines on a windows machine. 
Can anyone help?

TIA



Terry Honeyford



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to