Unexpected illegal backslash warning

"[email protected] [ocaml_beginners]" <[email protected]>
Newsgroups gmane.comp.lang.ocaml.beginners
Message-ID <[email protected]>
  I want to compute the list of all lines in my OCaml string. So I am going to search my string for all the characters matching the regexp "\n or \r"

 

 I tried Str.split (Str.regexp "\\n\|\\r"), but I get an illegal backlash warning. 
What is the correct way to write it ? How many slashes should I use ? Pehaps I should combine it with Str.quote ?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.