"Carriage return" is "\r". It is the control character which actually means to move your cursor (or the carriage on your typewriter/tty) over to the far left margin.
"Line feed Newline" (which might be what you meant but didn't know you meant) is "\n". It is the control character which means to move your cursor (or, etc.) down one line.
To make matters worse, different operating systems have different ideas of what the "Enter" key on your keyboard means and/or what character separates lines in a text file. DOS/Windows, being overly literal, expects both... one to go down a line and one to go back to the left margin "\r\n". Unix, is happy with just the line feed newline (no carriage return) "\n". And MAC, just to be different wants a carriage return (but no line feed newline) "\r". However, just to add to the confusion, different languages/platforms may map all of these combinations to and from a simple "\n" as appropos of the operating system.
Anyway, I just point this out because even though what you asked for was /\r/... it could be that what you need is /\r\n/ or, more likely, /\n/.
Update: as duff points out, I meant to say line feed (referring to the specific control character by name), but said newline instead. Should have man'd ascii quickly before posting so I didn't reverse the terms. My bad.
In reply to Re: Re: detecting carraige returns
by etcshadow
in thread detecting carraige returns
by 8BIT
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |