Unexpected illegal backslash warning
| 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 ?