From: Xavier Noria Date: 2011-03-29T00:01:11+09:00 Subject: Re: How to "find" new lines Damir, to know if a string is exactly a newline, please simply use ==: if str == "\n" ... end There are indirect ways to get the same result, you can also go from Barcelona to Paris via New York, but a straight line is nicer. Please people stop suggesting regexps for this simple problem.