Hi,


Am Montag, 14. Sep 2009, 03:10:12 +0900 schrieb Alan Munn:
> I have a script that processes text from the clipboard. Depending on the 
> application the text is copied from, (even on the same platform) lines 
> sometimes end in lf, cr, or possibly cr/lf.  What's the best way of 
> normalizing the lines so that my script will work independent of the 
> actual newlines chosen?

  str.gsub /(\r?\n)|\r/, $/

Bertram


-- 
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de