Right now I'm doing a split on a string and assuming that the newline from the user is \r\n like so:
string.split(/\r\n/)
What I'd like to do is split on either \r\n or just \n.
So how what would the regex be to split on either of those?
Right now I'm doing a split on a string and assuming that the newline from the user is \r\n like so:
string.split(/\r\n/)
What I'd like to do is split on either \r\n or just \n.
So how what would the regex be to split on either of those?